diff options
author | Eric Christopher <echristo@gmail.com> | 2015-04-28 22:56:57 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-04-28 22:56:57 +0000 |
commit | aa8593b62f9acaf18ab2c5cff6caacb78308f937 (patch) | |
tree | 9d36613c82d9c19064758f06344f929325b73df1 /test/profile/instrprof-override-filename-with-env.c | |
parent | e4bbae428d6bb8be96caa95eda59735a6e92322d (diff) |
Tests for r236055.
Patch by Teresa Johnson.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/profile/instrprof-override-filename-with-env.c')
-rw-r--r-- | test/profile/instrprof-override-filename-with-env.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/profile/instrprof-override-filename-with-env.c b/test/profile/instrprof-override-filename-with-env.c new file mode 100644 index 000000000..cce838916 --- /dev/null +++ b/test/profile/instrprof-override-filename-with-env.c @@ -0,0 +1,14 @@ +// RUN: %clang_profgen -o %t -O3 %s +// RUN: env LLVM_PROFILE_FILE=%t.good.profraw %run %t %t.bad.profraw +// RUN: llvm-profdata merge -o %t.profdata %t.good.profraw +// RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s + +void __llvm_profile_override_default_filename(const char *); +int main(int argc, const char *argv[]) { + // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD1:[0-9]+]] + if (argc < 2) + return 1; + __llvm_profile_override_default_filename(argv[1]); + return 0; +} +// CHECK: ![[PD1]] = !{!"branch_weights", i32 1, i32 2} |