Skip to content

Commit 00478a0

Browse files
committed
Rollup merge of #59377 - smaeul:patch/system-llvm, r=nikic
Correct minimum system LLVM version in tests Since commit 9452a8d, the new debug info format is only generated for LLVM 8 and newer versions. However, the tests still assume that LLVM 7 will use the new debug info format. Fix the tests (and a comment in the code) to match the actual version check.
2 parents 70cf325 + 8d3dd39 commit 00478a0

13 files changed

+17
-15
lines changed

src/librustc_codegen_llvm/debuginfo/metadata.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1156,12 +1156,14 @@ fn prepare_union_metadata(
11561156
// Enums
11571157
//=-----------------------------------------------------------------------------
11581158

1159-
// DWARF variant support is only available starting in LLVM 7.
1159+
// DWARF variant support is only available starting in LLVM 8.
11601160
// Although the earlier enum debug info output did not work properly
11611161
// in all situations, it is better for the time being to continue to
11621162
// sometimes emit the old style rather than emit something completely
1163-
// useless when rust is compiled against LLVM 6 or older. This
1164-
// function decides which representation will be emitted.
1163+
// useless when rust is compiled against LLVM 6 or older. LLVM 7
1164+
// contains an early version of the DWARF variant support, and will
1165+
// crash when handling the new debug info format. This function
1166+
// decides which representation will be emitted.
11651167
fn use_enum_fallback(cx: &CodegenCx<'_, '_>) -> bool {
11661168
// On MSVC we have to use the fallback mode, because LLVM doesn't
11671169
// lower variant parts to PDB.

src/test/codegen/enum-debug-clike.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// ignore-tidy-linelength
66
// ignore-windows
7-
// min-system-llvm-version 7.0
7+
// min-system-llvm-version 8.0
88

99
// compile-flags: -g -C no-prepopulate-passes
1010

src/test/codegen/enum-debug-niche-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// ignore-tidy-linelength
66
// ignore-windows
7-
// min-system-llvm-version 7.0
7+
// min-system-llvm-version 8.0
88

99
// compile-flags: -g -C no-prepopulate-passes
1010

src/test/codegen/enum-debug-niche.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// ignore-tidy-linelength
66
// ignore-windows
7-
// min-system-llvm-version 7.0
7+
// min-system-llvm-version 8.0
88

99
// compile-flags: -g -C no-prepopulate-passes
1010

src/test/codegen/enum-debug-tagged.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// ignore-tidy-linelength
66
// ignore-windows
7-
// min-system-llvm-version 7.0
7+
// min-system-llvm-version 8.0
88

99
// compile-flags: -g -C no-prepopulate-passes
1010

src/test/debuginfo/borrowed-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ignore-tidy-linelength
22

33
// Require LLVM with DW_TAG_variant_part and a gdb or lldb that can read it.
4-
// min-system-llvm-version: 7.0
4+
// min-system-llvm-version: 8.0
55
// min-gdb-version: 8.2
66
// rust-lldb
77

src/test/debuginfo/generic-enum-with-different-disr-sizes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// min-lldb-version: 310
44

55
// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
6-
// min-system-llvm-version: 7.0
6+
// min-system-llvm-version: 8.0
77
// min-gdb-version: 8.2
88

99
// compile-flags:-g

src/test/debuginfo/generic-struct-style-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// min-lldb-version: 310
33

44
// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
5-
// min-system-llvm-version: 7.0
5+
// min-system-llvm-version: 8.0
66
// min-gdb-version: 8.2
77

88
// compile-flags:-g

src/test/debuginfo/generic-tuple-style-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
44
// read it.
5-
// min-system-llvm-version: 7.0
5+
// min-system-llvm-version: 8.0
66
// min-gdb-version: 8.2
77
// rust-lldb
88

src/test/debuginfo/recursive-struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// ignore-lldb
33

44
// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
5-
// min-system-llvm-version: 7.0
5+
// min-system-llvm-version: 8.0
66
// min-gdb-version: 8.2
77

88
// compile-flags:-g

src/test/debuginfo/struct-style-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
44
// read it.
5-
// min-system-llvm-version: 7.0
5+
// min-system-llvm-version: 8.0
66
// min-gdb-version: 8.2
77
// rust-lldb
88

src/test/debuginfo/tuple-style-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
44
// read it.
5-
// min-system-llvm-version: 7.0
5+
// min-system-llvm-version: 8.0
66
// min-gdb-version: 8.2
77
// rust-lldb
88

src/test/debuginfo/unique-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
44
// read it.
5-
// min-system-llvm-version: 7.0
5+
// min-system-llvm-version: 8.0
66
// min-gdb-version: 8.2
77
// rust-lldb
88

0 commit comments

Comments
 (0)