1 #static volatile int do_mul;
2 #static volatile int x, v;
5 # if (do_mul) x *= v; else x /= v;
10 # return foo() + foo();
12 #Build as : clang -gmlt -fdebug-info-for-profiling -O2 discrim.c -o discrim
14 RUN: llvm-symbolizer --verbose --print-address --obj=%p/Inputs/discrim < %p/Inputs/discrim.inp | FileCheck %s
20 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
21 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
22 #CHECK-NEXT: Function start line: 4
23 #CHECK-NEXT: Function start address: 0x400590
25 #CHECK-NEXT: Column: 7
27 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
28 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
29 #CHECK-NEXT: Function start line: 9
30 #CHECK-NEXT: Function start address: 0x400590
32 #CHECK-NEXT: Column: 0
36 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
37 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
38 #CHECK-NEXT: Function start line: 4
39 #CHECK-NEXT: Function start address: 0x400590
41 #CHECK-NEXT: Column: 17
42 #CHECK-NEXT: Discriminator: 2
44 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
45 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
46 #CHECK-NEXT: Function start line: 9
47 #CHECK-NEXT: Function start address: 0x400590
49 #CHECK-NEXT: Column: 0
53 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
54 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
55 #CHECK-NEXT: Function start line: 4
56 #CHECK-NEXT: Function start address: 0x400590
58 #CHECK-NEXT: Column: 30
59 #CHECK-NEXT: Discriminator: 4
61 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
62 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
63 #CHECK-NEXT: Function start line: 9
64 #CHECK-NEXT: Function start address: 0x400590
66 #CHECK-NEXT: Column: 0
70 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
71 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
72 #CHECK-NEXT: Function start line: 4
73 #CHECK-NEXT: Function start address: 0x4005b9
75 #CHECK-NEXT: Column: 7
77 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
78 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
79 #CHECK-NEXT: Function start line: 9
80 #CHECK-NEXT: Function start address: 0x400590
82 #CHECK-NEXT: Column: 0
83 #CHECK-NEXT: Discriminator: 2
87 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
88 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
89 #CHECK-NEXT: Function start line: 4
90 #CHECK-NEXT: Function start address: 0x4005b9
92 #CHECK-NEXT: Column: 17
93 #CHECK-NEXT: Discriminator: 2
95 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
96 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
97 #CHECK-NEXT: Function start line: 9
98 #CHECK-NEXT: Function start address: 0x400590
100 #CHECK-NEXT: Column: 0
101 #CHECK-NEXT: Discriminator: 2
105 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
106 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
107 #CHECK-NEXT: Function start line: 4
108 #CHECK-NEXT: Function start address: 0x4005b9
110 #CHECK-NEXT: Column: 30
111 #CHECK-NEXT: Discriminator: 4
113 #CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
114 #CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
115 #CHECK-NEXT: Function start line: 9
116 #CHECK-NEXT: Function start address: 0x400590
117 #CHECK-NEXT: Line: 10
118 #CHECK-NEXT: Column: 0
119 #CHECK-NEXT: Discriminator: 2
121 #CHECK: some more text