From a85a8f9c2a38e868dae21aca2fe623d52f0fae42 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. llvm-svn: 289675 --- clang/lib/CodeGen/BackendUtil.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 0b72dc9..cef7485 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/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.7.4