summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-04-30 23:49:42 +0000
committerJustin Bogner <mail@justinbogner.com>2015-04-30 23:49:42 +0000
commita71e681792e1a4109c63ad46a663dd11041a699b (patch)
tree113c2553026ba2330d802c940eb327eacb654821 /clang/lib/CodeGen
parentba1900cefdeb393e5c8c8d5306c1d860a60ddd48 (diff)
downloadbcm5719-llvm-a71e681792e1a4109c63ad46a663dd11041a699b.tar.gz
bcm5719-llvm-a71e681792e1a4109c63ad46a663dd11041a699b.zip
InstrProf: Support for setting profile output from command line
This change is the third of 3 patches to add support for specifying the profile output from the command line via -fprofile-instr-generate=<path>, where the specified output path/file will be overridden by the LLVM_PROFILE_FILE environment variable. This patch adds the necessary support to the clang frontend, and adds a new test. The compiler-rt and llvm parts are r236055 and r236288, respectively. Patch by Teresa Johnson. Thanks! llvm-svn: 236289
Diffstat (limited to 'clang/lib/CodeGen')
-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 7bc351a61ab..22ae565b38f 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -394,6 +394,7 @@ void EmitAssemblyHelper::CreatePasses() {
if (CodeGenOpts.ProfileInstrGenerate) {
InstrProfOptions Options;
Options.NoRedZone = CodeGenOpts.DisableRedZone;
+ Options.InstrProfileOutput = CodeGenOpts.InstrProfileOutput;
MPM->add(createInstrProfilingPass(Options));
}
OpenPOWER on IntegriCloud