[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / clang / test / CoverageMapping / unused_names.c
blob2aaff2be35c9aba07597b88f991a414956cf868b
1 // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -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
5 // CHECK-DAG: @__profc_bar
6 // CHECK-DAG: @__llvm_prf_nm = private constant {{.*}}, section "{{.*__llvm_prf_names|\.lprfn\$M}}"
8 // These are never instantiated, so we shouldn't get counters for them.
9 //
10 // CHECK-NOT: @__profc_baz
11 // CHECK-NOT: @__profc_unused_names.c_qux
13 // SYSHEADER-NOT: @__profc_foo =
16 #ifdef IS_SYSHEADER
18 #pragma clang system_header
19 inline int foo(void) { return 0; }
21 #else
23 #define IS_SYSHEADER
24 #include __FILE__
26 int bar(void) { return 0; }
27 inline int baz(void) { return 0; }
28 static int qux(void) { return 42; }
30 #endif