[llvm] r302951 - LTO: Don't verify modules twice in verifyMergedModuleOnce
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 14:38:32 PDT 2017
Author: adrian
Date: Fri May 12 16:38:32 2017
New Revision: 302951
URL: http://llvm.org/viewvc/llvm-project?rev=302951&view=rev
Log:
LTO: Don't verify modules twice in verifyMergedModuleOnce
Differential Revision: https://reviews.llvm.org/D33140
Modified:
llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
Modified: llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOCodeGenerator.cpp?rev=302951&r1=302950&r2=302951&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/lib/LTO/LTOCodeGenerator.cpp Fri May 12 16:38:32 2017
@@ -495,17 +495,14 @@ void LTOCodeGenerator::verifyMergedModul
return;
HasVerifiedInput = true;
- if (LTOStripInvalidDebugInfo) {
- bool BrokenDebugInfo = false;
- if (verifyModule(*MergedModule, &dbgs(), &BrokenDebugInfo))
- report_fatal_error("Broken module found, compilation aborted!");
- if (BrokenDebugInfo) {
- emitWarning("Invalid debug info found, debug info will be stripped");
- StripDebugInfo(*MergedModule);
- }
- }
- if (verifyModule(*MergedModule, &dbgs()))
+ bool BrokenDebugInfo = false;
+ if (verifyModule(*MergedModule, &dbgs(),
+ LTOStripInvalidDebugInfo ? &BrokenDebugInfo : nullptr))
report_fatal_error("Broken module found, compilation aborted!");
+ if (BrokenDebugInfo) {
+ emitWarning("Invalid debug info found, debug info will be stripped");
+ StripDebugInfo(*MergedModule);
+ }
}
void LTOCodeGenerator::finishOptimizationRemarks() {
More information about the llvm-commits
mailing list