llvm.org GIT mirror llvm / 42fd905
LTO: Don't verify modules twice in verifyMergedModuleOnce Differential Revision: https://reviews.llvm.org/D33140 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302951 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian Prantl 3 years ago
1 changed file(s) with 7 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
494494 return;
495495 HasVerifiedInput = true;
496496
497 if (LTOStripInvalidDebugInfo) {
498 bool BrokenDebugInfo = false;
499 if (verifyModule(*MergedModule, &dbgs(), &BrokenDebugInfo))
500 report_fatal_error("Broken module found, compilation aborted!");
501 if (BrokenDebugInfo) {
502 emitWarning("Invalid debug info found, debug info will be stripped");
503 StripDebugInfo(*MergedModule);
504 }
505 }
506 if (verifyModule(*MergedModule, &dbgs()))
497 bool BrokenDebugInfo = false;
498 if (verifyModule(*MergedModule, &dbgs(),
499 LTOStripInvalidDebugInfo ? &BrokenDebugInfo : nullptr))
507500 report_fatal_error("Broken module found, compilation aborted!");
501 if (BrokenDebugInfo) {
502 emitWarning("Invalid debug info found, debug info will be stripped");
503 StripDebugInfo(*MergedModule);
504 }
508505 }
509506
510507 void LTOCodeGenerator::finishOptimizationRemarks() {