summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-05-12 21:38:32 +0000
committerAdrian Prantl <aprantl@apple.com>2017-05-12 21:38:32 +0000
commit1fa362f8119cab531de85c580a558fa520acc255 (patch)
treea5da83bf791e075e480e64ed85b227a4661e8d0c
parent2413af21747af4cf9f8d507be686afca7226ae06 (diff)
downloadbcm5719-llvm-1fa362f8119cab531de85c580a558fa520acc255.tar.gz
bcm5719-llvm-1fa362f8119cab531de85c580a558fa520acc255.zip
LTO: Don't verify modules twice in verifyMergedModuleOnce
Differential Revision: https://reviews.llvm.org/D33140 llvm-svn: 302951
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 86fba843e98..2fbacd7091e 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -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() {
OpenPOWER on IntegriCloud