[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

llvm-svn: 276517

clang/lib/CodeGen/BackendUtil.cpp

index c8594a1..282468f 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