diff options
author | Sean Silva <chisophugis@gmail.com> | 2016-03-30 00:25:15 +0000 |
---|---|---|
committer | Sean Silva <chisophugis@gmail.com> | 2016-03-30 00:25:15 +0000 |
commit | 0a62fb5b59926f5362f3ad261f0ad1151491e8c9 (patch) | |
tree | 8e6bb31f459a9d659116467e3e76506acbb7f60e /test | |
parent | cdb0f791e5a251bb4bf021f0da8f644307b73871 (diff) |
[libprofile] Make this test express intent a bit better.
This also makes it work on PS4 a bit better.
For running the libprofile tests on PS4, we are sneaking environment
variables through on the command line, so the extra argument for
LLVM_PROFILE_FILE was messing up the simple `argc < 2` check.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/profile/instrprof-value-prof.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/profile/instrprof-value-prof.c b/test/profile/instrprof-value-prof.c index 111db0af1..ce2683f43 100644 --- a/test/profile/instrprof-value-prof.c +++ b/test/profile/instrprof-value-prof.c @@ -1,6 +1,6 @@ // RUN: %clang_profgen -O2 -o %t %s -// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t 1 -// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t +// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t DO_NOT_INSTRUMENT // RUN: llvm-profdata merge -o %t.profdata %t.profraw // RUN: llvm-profdata merge -o %t-2.profdata %t-2.profraw // RUN: llvm-profdata merge -o %t-merged.profdata %t.profraw %t-2.profdata @@ -8,11 +8,11 @@ // RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %s // RUN: llvm-profdata show --all-functions -ic-targets %t-merged.profdata | FileCheck %s // -// RUN: env LLVM_PROFILE_FILE=%t-3.profraw LLVM_VP_BUFFER_SIZE=1 %run %t 1 -// RUN: env LLVM_PROFILE_FILE=%t-4.profraw LLVM_VP_BUFFER_SIZE=8 %run %t 1 -// RUN: env LLVM_PROFILE_FILE=%t-5.profraw LLVM_VP_BUFFER_SIZE=128 %run %t 1 -// RUN: env LLVM_PROFILE_FILE=%t-6.profraw LLVM_VP_BUFFER_SIZE=1024 %run %t 1 -// RUN: env LLVM_PROFILE_FILE=%t-7.profraw LLVM_VP_BUFFER_SIZE=102400 %run %t 1 +// RUN: env LLVM_PROFILE_FILE=%t-3.profraw LLVM_VP_BUFFER_SIZE=1 %run %t +// RUN: env LLVM_PROFILE_FILE=%t-4.profraw LLVM_VP_BUFFER_SIZE=8 %run %t +// RUN: env LLVM_PROFILE_FILE=%t-5.profraw LLVM_VP_BUFFER_SIZE=128 %run %t +// RUN: env LLVM_PROFILE_FILE=%t-6.profraw LLVM_VP_BUFFER_SIZE=1024 %run %t +// RUN: env LLVM_PROFILE_FILE=%t-7.profraw LLVM_VP_BUFFER_SIZE=102400 %run %t // RUN: llvm-profdata merge -o %t-3.profdata %t-3.profraw // RUN: llvm-profdata merge -o %t-4.profdata %t-4.profraw // RUN: llvm-profdata merge -o %t-5.profdata %t-5.profraw @@ -80,7 +80,7 @@ int main(int argc, const char *argv[]) { unsigned S, NS = 0, I, V, doInstrument = 1; const __llvm_profile_data *Data, *DataEnd; - if (argc < 2) + if (argc >= 2 && !strcmp(argv[1], "DO_NOT_INSTRUMENT")) doInstrument = 0; for (I = 0; I < 128; I++) { |