xref: /aosp_15_r20/external/llvm/test/tools/llvm-profdata/input-filenames.test (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# Create an input file.
2*9880d681SAndroid Build Coastguard WorkerRUN: echo '# comment 1' > %t.input
3*9880d681SAndroid Build Coastguard WorkerRUN: echo ' # comment 2' >> %t.input
4*9880d681SAndroid Build Coastguard WorkerRUN: echo 'bar' >> %t.input
5*9880d681SAndroid Build Coastguard WorkerRUN: echo ' baz' >> %t.input
6*9880d681SAndroid Build Coastguard WorkerRUN: echo "2,%t.weighted" >> %t.input
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker# Create the weighted file, since these actually need to exist.
9*9880d681SAndroid Build Coastguard WorkerRUN: echo ' ' > %t.weighted
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata merge -f %t.input -dump-input-file-list -o /dev/null foo | FileCheck %s
12*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata merge -input-files %t.input -dump-input-file-list -o /dev/null foo | FileCheck %s
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard WorkerCHECK: 1,foo
15*9880d681SAndroid Build Coastguard WorkerCHECK-NEXT: 1,bar
16*9880d681SAndroid Build Coastguard WorkerCHECK-NEXT: 1,baz
17*9880d681SAndroid Build Coastguard WorkerCHECK-NEXT: 2,{{.*}}.weighted
18