From: Xinliang David Li Date: Sat, 23 Jul 2016 04:28:59 +0000 (+0000) Subject: [Profile] Use a flag to enable PGO rather than the profraw filename X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=591295657ccd0b4fe27532a0bd9421caf76f0fc6;p=clang [Profile] Use a flag to enable PGO rather than the profraw filename Patch by Jake VanAdrighem Differential Revision: http://reviews.llvm.org/D22608 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276517 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index c8594a10f8..282468f418 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -453,6 +453,7 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM, MPM.add(createInstrProfilingLegacyPass(Options)); } if (CodeGenOpts.hasProfileIRInstr()) { + PMBuilder.EnablePGOInstrGen = true; if (!CodeGenOpts.InstrProfileOutput.empty()) PMBuilder.PGOInstrGen = CodeGenOpts.InstrProfileOutput; else