brintos

brintos / llvm-project-archived public Read only

0
0
Text · 805 B · 2aaff2b Raw
31 lines · c
1// RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -main-file-name unused_names.c -o - %s > %t2// RUN: FileCheck -input-file %t %s3// RUN: FileCheck -check-prefix=SYSHEADER -input-file %t %s4 5// CHECK-DAG: @__profc_bar6// CHECK-DAG: @__llvm_prf_nm = private constant {{.*}}, section "{{.*__llvm_prf_names|\.lprfn\$M}}"7 8// These are never instantiated, so we shouldn't get counters for them.9//10// CHECK-NOT: @__profc_baz11// CHECK-NOT: @__profc_unused_names.c_qux12 13// SYSHEADER-NOT: @__profc_foo =14 15 16#ifdef IS_SYSHEADER17 18#pragma clang system_header19inline int foo(void) { return 0; }20 21#else22 23#define IS_SYSHEADER24#include __FILE__25 26int bar(void) { return 0; }27inline int baz(void) { return 0; }28static int qux(void) { return 42; }29 30#endif31