Blame SOURCES/rust-pr57840-llvm7-debuginfo-variants.patch
|
Pablo Greco |
3f2336 |
commit ab998a2eeb2bcdc69ce70c814af97f0d1302a404 (from d17f62d857c70508efbf60be41135880bcd2e062)
|
|
Pablo Greco |
3f2336 |
Merge: d17f62d857c7 9452a8dfa3ba
|
|
Pablo Greco |
3f2336 |
Author: Mazdak Farrokhzad <twingoow@gmail.com>
|
|
Pablo Greco |
3f2336 |
Date: Thu Jan 24 00:20:00 2019 +0100
|
|
Pablo Greco |
3f2336 |
|
|
Pablo Greco |
3f2336 |
Rollup merge of #57840 - tromey:fix-issue-57762, r=nikic
|
|
Pablo Greco |
3f2336 |
|
|
Pablo Greco |
3f2336 |
Fix issue 57762
|
|
Pablo Greco |
3f2336 |
|
|
Pablo Greco |
3f2336 |
against a stock LLVM 7. LLVM 7 was released without a necessary fix
|
|
Pablo Greco |
3f2336 |
for a bug in the DWARF discriminant code.
|
|
Pablo Greco |
3f2336 |
|
|
Pablo Greco |
3f2336 |
This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.
|
|
Pablo Greco |
3f2336 |
|
|
Pablo Greco |
3f2336 |
Closes #57762
|
|
Pablo Greco |
3f2336 |
|
|
Pablo Greco |
3f2336 |
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
|
|
Pablo Greco |
3f2336 |
index 6deedd0b5ea3..9f63038c3623 100644
|
|
Pablo Greco |
3f2336 |
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
|
|
Pablo Greco |
3f2336 |
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
|
|
Pablo Greco |
3f2336 |
@@ -1164,7 +1164,10 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool {
|
|
Pablo Greco |
3f2336 |
// On MSVC we have to use the fallback mode, because LLVM doesn't
|
|
Pablo Greco |
3f2336 |
// lower variant parts to PDB.
|
|
Pablo Greco |
3f2336 |
return cx.sess().target.target.options.is_like_msvc
|
|
Pablo Greco |
3f2336 |
- || llvm_util::get_major_version() < 7;
|
|
Pablo Greco |
3f2336 |
+ // LLVM version 7 did not release with an important bug fix;
|
|
Pablo Greco |
3f2336 |
+ // but the required patch is in the LLVM 8. Rust LLVM reports
|
|
Pablo Greco |
3f2336 |
+ // 8 as well.
|
|
Pablo Greco |
3f2336 |
+ || llvm_util::get_major_version() < 8;
|
|
Pablo Greco |
3f2336 |
}
|
|
Pablo Greco |
3f2336 |
|
|
Pablo Greco |
3f2336 |
// Describes the members of an enum value: An enum is described as a union of
|