forked from OSchip/llvm-project
LTO: Don't verify modules twice in verifyMergedModuleOnce
Differential Revision: https://reviews.llvm.org/D33140 llvm-svn: 302951
This commit is contained in:
parent
2413af2174
commit
1fa362f811
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue