Skip to content

Commit 0a62fb5

Browse files
committed
[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
1 parent cdb0f79 commit 0a62fb5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/profile/instrprof-value-prof.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
// RUN: %clang_profgen -O2 -o %t %s
2-
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t 1
3-
// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t
2+
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
3+
// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t DO_NOT_INSTRUMENT
44
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
55
// RUN: llvm-profdata merge -o %t-2.profdata %t-2.profraw
66
// RUN: llvm-profdata merge -o %t-merged.profdata %t.profraw %t-2.profdata
77
// RUN: llvm-profdata show --all-functions -ic-targets %t-2.profdata | FileCheck %s -check-prefix=NO-VALUE
88
// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %s
99
// RUN: llvm-profdata show --all-functions -ic-targets %t-merged.profdata | FileCheck %s
1010
//
11-
// RUN: env LLVM_PROFILE_FILE=%t-3.profraw LLVM_VP_BUFFER_SIZE=1 %run %t 1
12-
// RUN: env LLVM_PROFILE_FILE=%t-4.profraw LLVM_VP_BUFFER_SIZE=8 %run %t 1
13-
// RUN: env LLVM_PROFILE_FILE=%t-5.profraw LLVM_VP_BUFFER_SIZE=128 %run %t 1
14-
// RUN: env LLVM_PROFILE_FILE=%t-6.profraw LLVM_VP_BUFFER_SIZE=1024 %run %t 1
15-
// RUN: env LLVM_PROFILE_FILE=%t-7.profraw LLVM_VP_BUFFER_SIZE=102400 %run %t 1
11+
// RUN: env LLVM_PROFILE_FILE=%t-3.profraw LLVM_VP_BUFFER_SIZE=1 %run %t
12+
// RUN: env LLVM_PROFILE_FILE=%t-4.profraw LLVM_VP_BUFFER_SIZE=8 %run %t
13+
// RUN: env LLVM_PROFILE_FILE=%t-5.profraw LLVM_VP_BUFFER_SIZE=128 %run %t
14+
// RUN: env LLVM_PROFILE_FILE=%t-6.profraw LLVM_VP_BUFFER_SIZE=1024 %run %t
15+
// RUN: env LLVM_PROFILE_FILE=%t-7.profraw LLVM_VP_BUFFER_SIZE=102400 %run %t
1616
// RUN: llvm-profdata merge -o %t-3.profdata %t-3.profraw
1717
// RUN: llvm-profdata merge -o %t-4.profdata %t-4.profraw
1818
// RUN: llvm-profdata merge -o %t-5.profdata %t-5.profraw
@@ -80,7 +80,7 @@ int main(int argc, const char *argv[]) {
8080
unsigned S, NS = 0, I, V, doInstrument = 1;
8181
const __llvm_profile_data *Data, *DataEnd;
8282

83-
if (argc < 2)
83+
if (argc >= 2 && !strcmp(argv[1], "DO_NOT_INSTRUMENT"))
8484
doInstrument = 0;
8585

8686
for (I = 0; I < 128; I++) {

0 commit comments

Comments
 (0)