[ELF] Reorder SectionBase/InputSectionBase members
[llvm-project.git] / clang / test / CoverageMapping / macroception.c
blob6d4b3ed427f7fda5c9fc2fc01da262e7af9ec14b
1 // RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macroception.c %s | FileCheck %s
3 #define M2 {
4 #define M1 M2
5 #define M22 }
6 #define M11 M22
8 // CHECK-LABEL: main:
9 // CHECK-NEXT: Expansion,File 0, [[@LINE+2]]:16 -> [[@LINE+2]]:18 = #0
10 // CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+3]]:2 = #0
11 int main(void) M1
12 return 0;
14 // CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0
15 // CHECK-NEXT: File 2, 3:12 -> 3:13 = #0
17 // CHECK-LABEL: func2:
18 // CHECK-NEXT: File 0, [[@LINE+2]]:18 -> [[@LINE+4]]:4 = #0
19 // CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:1 -> [[@LINE+3]]:4 = #0
20 void func2(void) {
21 int x = 0;
22 M11
23 // CHECK-NEXT: Expansion,File 1, 6:13 -> 6:16 = #0
24 // CHECK-NEXT: File 2, 5:13 -> 5:14 = #0
26 // CHECK-LABEL: func3:
27 // CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:18 -> [[@LINE+3]]:20 = #0
28 // CHECK-NEXT: File 0, [[@LINE+2]]:20 -> [[@LINE+4]]:4 = #0
29 // CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:1 -> [[@LINE+3]]:4 = #0
30 void func3(void) M1
31 int x = 0;
32 M11
33 // CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0
34 // CHECK-NEXT: Expansion,File 2, 6:13 -> 6:16 = #0
35 // CHECK-NEXT: File 3, 3:12 -> 3:13 = #0
36 // CHECK-NEXT: File 4, 5:13 -> 5:14 = #0
38 // CHECK-LABEL: func4:
39 // CHECK-NEXT: Expansion,File 0, [[@LINE+3]]:18 -> [[@LINE+3]]:20 = #0
40 // CHECK-NEXT: File 0, [[@LINE+2]]:20 -> [[@LINE+2]]:24 = #0
41 // CHECK-NEXT: Expansion,File 0, [[@LINE+1]]:21 -> [[@LINE+1]]:24 = #0
42 void func4(void) M1 M11
43 // CHECK-NEXT: Expansion,File 1, 4:12 -> 4:14 = #0
44 // CHECK-NEXT: Expansion,File 2, 6:13 -> 6:16 = #0
45 // CHECK-NEXT: File 3, 3:12 -> 3:13 = #0
46 // CHECK-NEXT: File 4, 5:13 -> 5:14 = #0