| 
9 | 9 | // REDEFINE: %{cflags} = -no-pie  | 
10 | 10 | // RUN: %clang_profgen -fuse-ld=lld -Wl,--build-id -o %t %s %{cflags}  | 
11 | 11 | // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t  | 
12 |  | -// RUN: llvm-readelf --notes %t && llvm-profdata show --binary-ids %t.profraw > FileCheck  | 
 | 12 | +// RUN: llvm-readelf --notes %t > %t2 && llvm-profdata show --binary-ids %t.profraw >> %t2 && FileCheck %s < %t2  | 
13 | 13 | 
 
  | 
14 | 14 | // REDEFINE: %{cflags} = -pie -fPIE  | 
15 | 15 | // RUN: %clang_profgen -fuse-ld=lld -Wl,--build-id -o %t %s %{cflags}  | 
16 | 16 | // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t  | 
17 |  | -// RUN: llvm-readelf --notes %t && llvm-profdata show --binary-ids %t.profraw > FileCheck  | 
 | 17 | +// RUN: llvm-readelf --notes %t > %t2 && llvm-profdata show --binary-ids %t.profraw >> %t2 && FileCheck %s < %t2  | 
18 | 18 | 
 
  | 
19 | 19 | // Moving the note after .bss also gives it extra LOAD segment padding,  | 
20 | 20 | // making its memory offset different than its file offset.  | 
 | 
23 | 23 | // REDEFINE: %{cflags} = -no-pie -Wl,--script=%t.script  | 
24 | 24 | // RUN: %clang_profgen -fuse-ld=lld -Wl,--build-id -o %t %s %{cflags}  | 
25 | 25 | // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t  | 
26 |  | -// RUN: llvm-readelf --notes %t && llvm-profdata show --binary-ids %t.profraw > FileCheck  | 
 | 26 | +// RUN: llvm-readelf --notes %t > %t2 && llvm-profdata show --binary-ids %t.profraw >> %t2 && FileCheck %s < %t2  | 
27 | 27 | 
 
  | 
28 | 28 | // REDEFINE: %{cflags} = -pie -fPIE -Wl,--script=%t.script  | 
29 | 29 | // RUN: %clang_profgen -fuse-ld=lld -Wl,--build-id -o %t %s %{cflags}  | 
30 | 30 | // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t  | 
31 |  | -// RUN: llvm-readelf --notes %t && llvm-profdata show --binary-ids %t.profraw > FileCheck  | 
 | 31 | +// RUN: llvm-readelf --notes %t > %t2 && llvm-profdata show --binary-ids %t.profraw >> %t2 && FileCheck %s < %t2  | 
32 | 32 | 
 
  | 
33 | 33 | // CHECK-LABEL{LITERAL}: .note.gnu.build-id  | 
34 | 34 | // CHECK: Build ID: [[ID:[0-9a-f]+]]  | 
 | 
0 commit comments