summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-12-13 11:15:40 -0800
committerFangrui Song <maskray@google.com>2019-12-13 11:38:20 -0800
commit193da743db63bc7299717f583a63e68d55408731 (patch)
tree5452f0a8b3a7758267e3f6f0c7dde53530396638 /llvm/lib/Transforms
parent940600ae4172d34232674d7e6f191dcff009df74 (diff)
downloadbcm5719-llvm-193da743db63bc7299717f583a63e68d55408731.tar.gz
bcm5719-llvm-193da743db63bc7299717f583a63e68d55408731.zip
[profile] Fix a crash when -fprofile-remapping-file= triggers an error
Reviewed By: wmi Differential Revision: https://reviews.llvm.org/D71485
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/SampleProfile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index 2b169638d40..a1fbb1adc41 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -1973,7 +1973,8 @@ PreservedAnalyses SampleProfileLoaderPass::run(Module &M,
: ProfileRemappingFileName,
IsThinLTOPreLink, GetAssumptionCache, GetTTI);
- SampleLoader.doInitialization(M);
+ if (!SampleLoader.doInitialization(M))
+ return PreservedAnalyses::all();
ProfileSummaryInfo *PSI = &AM.getResult<ProfileSummaryAnalysis>(M);
CallGraph &CG = AM.getResult<CallGraphAnalysis>(M);
OpenPOWER on IntegriCloud