1 // REQUIRES: linux 2 // RUN: %clang_profgen -Wl,--build-id=none -O2 -o %t %s 3 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t 4 // RUN: llvm-profdata show --binary-ids %t.profraw > %t.out 5 // RUN: FileCheck %s --check-prefix=NO-BINARY-ID < %t.out 6 // RUN: llvm-profdata merge -o %t.profdata %t.profraw 7 8 // RUN: %clang_profgen -Wl,--build-id -O2 -o %t %s 9 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t 10 // RUN: llvm-profdata show --binary-ids %t.profraw > %t.profraw.out 11 // RUN: FileCheck %s --check-prefix=BINARY-ID-RAW-PROF < %t.profraw.out 12 13 void foo() { 14 } 15 16 void bar() { 17 } 18 19 int main() { 20 foo(); 21 bar(); 22 return 0; 23 } 24 25 // NO-BINARY-ID: Instrumentation level: Front-end 26 // NO-BINARY-ID-NEXT: Total functions: 3 27 // NO-BINARY-ID-NEXT: Maximum function count: 1 28 // NO-BINARY-ID-NEXT: Maximum internal block count: 0 29 // NO-BINARY-ID-NOT: Binary IDs: 30 31 // BINARY-ID-RAW-PROF: Instrumentation level: Front-end 32 // BINARY-ID-RAW-PROF-NEXT: Total functions: 3 33 // BINARY-ID-RAW-PROF-NEXT: Maximum function count: 1 34 // BINARY-ID-RAW-PROF-NEXT: Maximum internal block count: 0 35 // BINARY-ID-RAW-PROF-NEXT: Binary IDs: 36 // BINARY-ID-RAW-PROF-NEXT: {{[0-9a-f]+}} 37