diff options
author | Justin Bogner <mail@justinbogner.com> | 2015-04-30 23:49:42 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2015-04-30 23:49:42 +0000 |
commit | a71e681792e1a4109c63ad46a663dd11041a699b (patch) | |
tree | 113c2553026ba2330d802c940eb327eacb654821 /clang/test | |
parent | ba1900cefdeb393e5c8c8d5306c1d860a60ddd48 (diff) | |
download | bcm5719-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/test')
-rw-r--r-- | clang/test/Profile/c-generate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Profile/c-generate.c b/clang/test/Profile/c-generate.c new file mode 100644 index 00000000000..8b979d629db --- /dev/null +++ b/clang/test/Profile/c-generate.c @@ -0,0 +1,10 @@ +// Check that the -fprofile-instr-generate= form works. +// RUN: %clang_cc1 -main-file-name c-generate.c %s -o - -emit-llvm -fprofile-instr-generate=c-generate-test.profraw | FileCheck %s + +// CHECK: private constant [24 x i8] c"c-generate-test.profraw\00" +// CHECK: call void @__llvm_profile_set_filename_env_override(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @0, i32 0, i32 0)) +// CHECK: declare void @__llvm_profile_set_filename_env_override(i8*) + +int main(void) { + return 0; +} |