From da7dce191aa2f209af1ca8e034a4f5d826ca4e3c Mon Sep 17 00:00:00 2001 From: Dehao Chen Date: Wed, 14 Dec 2016 17:22:53 +0000 Subject: [PATCH] revert r289670 which breaks bot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289675 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/BackendUtil.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 0b72dc9393..cef7485446 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -464,8 +464,10 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM, if (CodeGenOpts.hasProfileIRUse()) PMBuilder.PGOInstrUse = CodeGenOpts.ProfileInstrumentUsePath; - if (!CodeGenOpts.SampleProfileFile.empty()) - PMBuilder.PGOSampleUse = CodeGenOpts.SampleProfileFile; + if (!CodeGenOpts.SampleProfileFile.empty()) { + MPM.add(createPruneEHPass()); + MPM.add(createSampleProfileLoaderPass(CodeGenOpts.SampleProfileFile)); + } PMBuilder.populateFunctionPassManager(FPM); PMBuilder.populateModulePassManager(MPM); -- 2.40.0