]> granicus.if.org Git - clang/commitdiff
[Profile] Use a flag to enable PGO rather than the profraw filename
authorXinliang David Li <davidxl@google.com>
Sat, 23 Jul 2016 04:28:59 +0000 (04:28 +0000)
committerXinliang David Li <davidxl@google.com>
Sat, 23 Jul 2016 04:28:59 +0000 (04:28 +0000)
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

lib/CodeGen/BackendUtil.cpp

index c8594a10f846d548b7b8f5ffd0213bdfc136f441..282468f4189c32adc77f3e323f6d5b6f80ca541f 100644 (file)
@@ -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