LTO: Don't verify modules twice in verifyMergedModuleOnce

Differential Revision: https://reviews.llvm.org/D33140

llvm-svn: 302951
This commit is contained in:
Adrian Prantl 2017-05-12 21:38:32 +00:00
parent 2413af2174
commit 1fa362f811
1 changed files with 7 additions and 10 deletions

View File

@ -495,17 +495,14 @@ void LTOCodeGenerator::verifyMergedModuleOnce() {
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() {