about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-01 11:38:20 +0000
committerbors <bors@rust-lang.org>2018-08-01 11:38:20 +0000
commit11f812aa7d1df09724f94c2b095f6dbfd367da17 (patch)
tree680776e9ca053a1b6c79a84093473edf4f439ec7 /src/rustllvm/RustWrapper.cpp
parent8c069ceba81a0fffc1ce95aaf7e8339e11bf2796 (diff)
parentf0bceba669159f7bac581d03412cf69ce4558685 (diff)
downloadrust-11f812aa7d1df09724f94c2b095f6dbfd367da17.tar.gz
rust-11f812aa7d1df09724f94c2b095f6dbfd367da17.zip
Auto merge of #52474 - alexcrichton:better-lto-error, r=eddyb
rustc: Handle linker diagnostics from LLVM

Previously linker diagnostic were being hidden when two modules were linked
together but failed to link. This commit fixes the situation by ensuring that we
have a diagnostic handler installed and also adds support for handling linker
diagnostics.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index f2b5297285c..4bcb4fd7ad3 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -984,6 +984,7 @@ enum class LLVMRustDiagnosticKind {
   OptimizationRemarkOther,
   OptimizationFailure,
   PGOProfile,
+  Linker,
 };
 
 static LLVMRustDiagnosticKind toRust(DiagnosticKind Kind) {
@@ -1008,6 +1009,8 @@ static LLVMRustDiagnosticKind toRust(DiagnosticKind Kind) {
     return LLVMRustDiagnosticKind::OptimizationRemarkAnalysisAliasing;
   case DK_PGOProfile:
     return LLVMRustDiagnosticKind::PGOProfile;
+  case DK_Linker:
+    return LLVMRustDiagnosticKind::Linker;
   default:
     return (Kind >= DK_FirstRemark && Kind <= DK_LastRemark)
                ? LLVMRustDiagnosticKind::OptimizationRemarkOther