1 // RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -main-file-name unused_names.c -o - %s > %t 2 // RUN: FileCheck -input-file %t %s 3 // RUN: FileCheck -check-prefix=SYSHEADER -input-file %t %s 4 5 // Since foo is never emitted, there should not be a profile name for it. 6 7 // CHECK-DAG: @__profn_bar = {{.*}} [3 x i8] c"bar" 8 // CHECK-DAG: @__profn_baz = {{.*}} [3 x i8] c"baz" 9 // CHECK-DAG: @__profn_unused_names.c_qux = {{.*}} [18 x i8] c"unused_names.c:qux" 10 // CHECK-DAG: @__llvm_prf_nm = private constant {{.*}}, section "{{.*}}__llvm_prf_names" 11 12 // SYSHEADER-NOT: @__profn_foo = 13 14 15 #ifdef IS_SYSHEADER 16 17 #pragma clang system_header 18 inline int foo() { return 0; } 19 20 #else 21 22 #define IS_SYSHEADER 23 #include __FILE__ 24 25 int bar() { return 0; } 26 inline int baz() { return 0; } 27 static int qux() { return 42; } 28 29 #endif 30