about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2019-03-24 15:32:57 +0800
committerkennytm <kennytm@gmail.com>2019-03-24 22:43:48 +0800
commit00478a0f3c56db92e2abe4dd73b45d7f380fe43f (patch)
tree55e55f82a4faad3fcd0140afe3f937eb4e6109c1
parent70cf3255023ec3034256def20f5d7cda0a1e663d (diff)
parent8d3dd39d885f427faf3898521e7e1e9319d76b91 (diff)
downloadrust-00478a0f3c56db92e2abe4dd73b45d7f380fe43f.tar.gz
rust-00478a0f3c56db92e2abe4dd73b45d7f380fe43f.zip
Rollup merge of #59377 - smaeul:patch/system-llvm, r=nikic
Correct minimum system LLVM version in tests

Since commit 9452a8dfa3ba, 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.
-rw-r--r--src/librustc_codegen_llvm/debuginfo/metadata.rs8
-rw-r--r--src/test/codegen/enum-debug-clike.rs2
-rw-r--r--src/test/codegen/enum-debug-niche-2.rs2
-rw-r--r--src/test/codegen/enum-debug-niche.rs2
-rw-r--r--src/test/codegen/enum-debug-tagged.rs2
-rw-r--r--src/test/debuginfo/borrowed-enum.rs2
-rw-r--r--src/test/debuginfo/generic-enum-with-different-disr-sizes.rs2
-rw-r--r--src/test/debuginfo/generic-struct-style-enum.rs2
-rw-r--r--src/test/debuginfo/generic-tuple-style-enum.rs2
-rw-r--r--src/test/debuginfo/recursive-struct.rs2
-rw-r--r--src/test/debuginfo/struct-style-enum.rs2
-rw-r--r--src/test/debuginfo/tuple-style-enum.rs2
-rw-r--r--src/test/debuginfo/unique-enum.rs2
13 files changed, 17 insertions, 15 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
index ddcbf29da83..8efa025e3dd 100644
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -1156,12 +1156,14 @@ fn prepare_union_metadata(
 // Enums
 //=-----------------------------------------------------------------------------
 
-// DWARF variant support is only available starting in LLVM 7.
+// DWARF variant support is only available starting in LLVM 8.
 // Although the earlier enum debug info output did not work properly
 // in all situations, it is better for the time being to continue to
 // sometimes emit the old style rather than emit something completely
-// useless when rust is compiled against LLVM 6 or older.  This
-// function decides which representation will be emitted.
+// useless when rust is compiled against LLVM 6 or older. LLVM 7
+// contains an early version of the DWARF variant support, and will
+// crash when handling the new debug info format. This function
+// decides which representation will be emitted.
 fn use_enum_fallback(cx: &CodegenCx<'_, '_>) -> bool {
     // On MSVC we have to use the fallback mode, because LLVM doesn't
     // lower variant parts to PDB.
diff --git a/src/test/codegen/enum-debug-clike.rs b/src/test/codegen/enum-debug-clike.rs
index 62cfef5a845..f268c8bcbcc 100644
--- a/src/test/codegen/enum-debug-clike.rs
+++ b/src/test/codegen/enum-debug-clike.rs
@@ -4,7 +4,7 @@
 
 // ignore-tidy-linelength
 // ignore-windows
-// min-system-llvm-version 7.0
+// min-system-llvm-version 8.0
 
 // compile-flags: -g -C no-prepopulate-passes
 
diff --git a/src/test/codegen/enum-debug-niche-2.rs b/src/test/codegen/enum-debug-niche-2.rs
index 369fa1fcfda..aa6cbf66b4a 100644
--- a/src/test/codegen/enum-debug-niche-2.rs
+++ b/src/test/codegen/enum-debug-niche-2.rs
@@ -4,7 +4,7 @@
 
 // ignore-tidy-linelength
 // ignore-windows
-// min-system-llvm-version 7.0
+// min-system-llvm-version 8.0
 
 // compile-flags: -g -C no-prepopulate-passes
 
diff --git a/src/test/codegen/enum-debug-niche.rs b/src/test/codegen/enum-debug-niche.rs
index 1273a785ba4..93eebde7b8f 100644
--- a/src/test/codegen/enum-debug-niche.rs
+++ b/src/test/codegen/enum-debug-niche.rs
@@ -4,7 +4,7 @@
 
 // ignore-tidy-linelength
 // ignore-windows
-// min-system-llvm-version 7.0
+// min-system-llvm-version 8.0
 
 // compile-flags: -g -C no-prepopulate-passes
 
diff --git a/src/test/codegen/enum-debug-tagged.rs b/src/test/codegen/enum-debug-tagged.rs
index 5c37e40c270..84976ce97af 100644
--- a/src/test/codegen/enum-debug-tagged.rs
+++ b/src/test/codegen/enum-debug-tagged.rs
@@ -4,7 +4,7 @@
 
 // ignore-tidy-linelength
 // ignore-windows
-// min-system-llvm-version 7.0
+// min-system-llvm-version 8.0
 
 // compile-flags: -g -C no-prepopulate-passes
 
diff --git a/src/test/debuginfo/borrowed-enum.rs b/src/test/debuginfo/borrowed-enum.rs
index e27a31dd0e5..63c11f59c15 100644
--- a/src/test/debuginfo/borrowed-enum.rs
+++ b/src/test/debuginfo/borrowed-enum.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
 
 // Require LLVM with DW_TAG_variant_part and a gdb or lldb that can read it.
-// min-system-llvm-version: 7.0
+// min-system-llvm-version: 8.0
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
index 9392aa70971..e26294cb730 100644
--- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
+++ b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
@@ -3,7 +3,7 @@
 // min-lldb-version: 310
 
 // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 7.0
+// min-system-llvm-version: 8.0
 // min-gdb-version: 8.2
 
 // compile-flags:-g
diff --git a/src/test/debuginfo/generic-struct-style-enum.rs b/src/test/debuginfo/generic-struct-style-enum.rs
index 3e593470303..3dc5cb807b4 100644
--- a/src/test/debuginfo/generic-struct-style-enum.rs
+++ b/src/test/debuginfo/generic-struct-style-enum.rs
@@ -2,7 +2,7 @@
 // min-lldb-version: 310
 
 // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 7.0
+// min-system-llvm-version: 8.0
 // min-gdb-version: 8.2
 
 // compile-flags:-g
diff --git a/src/test/debuginfo/generic-tuple-style-enum.rs b/src/test/debuginfo/generic-tuple-style-enum.rs
index 3c136add079..b16634ee6d7 100644
--- a/src/test/debuginfo/generic-tuple-style-enum.rs
+++ b/src/test/debuginfo/generic-tuple-style-enum.rs
@@ -2,7 +2,7 @@
 
 // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
 // read it.
-// min-system-llvm-version: 7.0
+// min-system-llvm-version: 8.0
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs
index c3d2bea9139..8fb83b7956b 100644
--- a/src/test/debuginfo/recursive-struct.rs
+++ b/src/test/debuginfo/recursive-struct.rs
@@ -2,7 +2,7 @@
 // ignore-lldb
 
 // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
-// min-system-llvm-version: 7.0
+// min-system-llvm-version: 8.0
 // min-gdb-version: 8.2
 
 // compile-flags:-g
diff --git a/src/test/debuginfo/struct-style-enum.rs b/src/test/debuginfo/struct-style-enum.rs
index 1654c932091..5843b076b1f 100644
--- a/src/test/debuginfo/struct-style-enum.rs
+++ b/src/test/debuginfo/struct-style-enum.rs
@@ -2,7 +2,7 @@
 
 // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
 // read it.
-// min-system-llvm-version: 7.0
+// min-system-llvm-version: 8.0
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/debuginfo/tuple-style-enum.rs b/src/test/debuginfo/tuple-style-enum.rs
index fd76bcb0afc..4d9727a388b 100644
--- a/src/test/debuginfo/tuple-style-enum.rs
+++ b/src/test/debuginfo/tuple-style-enum.rs
@@ -2,7 +2,7 @@
 
 // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
 // read it.
-// min-system-llvm-version: 7.0
+// min-system-llvm-version: 8.0
 // min-gdb-version: 8.2
 // rust-lldb
 
diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs
index da0d06213e0..32bd93f1ed2 100644
--- a/src/test/debuginfo/unique-enum.rs
+++ b/src/test/debuginfo/unique-enum.rs
@@ -2,7 +2,7 @@
 
 // Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
 // read it.
-// min-system-llvm-version: 7.0
+// min-system-llvm-version: 8.0
 // min-gdb-version: 8.2
 // rust-lldb