From: Dehao Chen Date: Wed, 14 Dec 2016 17:22:53 +0000 (+0000) Subject: revert r289670 which breaks bot. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da7dce191aa2f209af1ca8e034a4f5d826ca4e3c;p=clang revert r289670 which breaks bot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289675 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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);