aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-07-23 04:28:59 +0000
committerXinliang David Li <davidxl@google.com>2016-07-23 04:28:59 +0000
commitb65f8ae9e8876ace5d71233c548990e0e2adba4b (patch)
tree0b482fc4a3124bffa99e17323a9ed4dab3f27707 /clang/lib/CodeGen/BackendUtil.cpp
parent92392454010a6d7ad090fbba785c288dfd81c416 (diff)
downloadllvm-b65f8ae9e8876ace5d71233c548990e0e2adba4b.zip
llvm-b65f8ae9e8876ace5d71233c548990e0e2adba4b.tar.gz
llvm-b65f8ae9e8876ace5d71233c548990e0e2adba4b.tar.bz2
[Profile] Use a flag to enable PGO rather than the profraw filename
Patch by Jake VanAdrighem Differential Revision: http://reviews.llvm.org/D22608 llvm-svn: 276517
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index c8594a10..282468f 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/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