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;
|
return;
|
||||||
HasVerifiedInput = true;
|
HasVerifiedInput = true;
|
||||||
|
|
||||||
if (LTOStripInvalidDebugInfo) {
|
bool BrokenDebugInfo = false;
|
||||||
bool BrokenDebugInfo = false;
|
if (verifyModule(*MergedModule, &dbgs(),
|
||||||
if (verifyModule(*MergedModule, &dbgs(), &BrokenDebugInfo))
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (verifyModule(*MergedModule, &dbgs()))
|
|
||||||
report_fatal_error("Broken module found, compilation aborted!");
|
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() {
|
void LTOCodeGenerator::finishOptimizationRemarks() {
|
||||||
|
|
Loading…
Reference in New Issue