1#static volatile int do_mul; 2#static volatile int x, v; 3# 4#int foo () { 5# if (do_mul) x *= v; else x /= v; 6# return x; 7#} 8# 9#int main() { 10# return foo() + foo(); 11#} 12#Build as : clang -gmlt -fdebug-info-for-profiling -O2 discrim.c -o discrim 13 14RUN: llvm-symbolizer -verbose -print-address -obj=%p/Inputs/discrim < %p/Inputs/discrim.inp | FileCheck %s 15 16#CHECK: some text 17 18#CHECK: 0x400590 19#CHECK-NEXT: foo 20#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 21#CHECK-NEXT: Function start line: 4 22#CHECK-NEXT: Line: 9 23#CHECK-NEXT: Column: 0 24#CHECK-NEXT: main 25#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 26#CHECK-NEXT: Function start line: 9 27#CHECK-NEXT: Line: 10 28#CHECK-NEXT: Column: 0 29 30#CHECK: 0x4005a5 31#CHECK-NEXT: foo 32#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 33#CHECK-NEXT: Function start line: 4 34#CHECK-NEXT: Line: 5 35#CHECK-NEXT: Column: 17 36#CHECK-NEXT: Discriminator: 2 37#CHECK-NEXT: main 38#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 39#CHECK-NEXT: Function start line: 9 40#CHECK-NEXT: Line: 10 41#CHECK-NEXT: Column: 0 42 43#CHECK: 0x4005ad 44#CHECK-NEXT: foo 45#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 46#CHECK-NEXT: Function start line: 4 47#CHECK-NEXT: Line: 0 48#CHECK-NEXT: Column: 30 49#CHECK-NEXT: Discriminator: 4 50#CHECK-NEXT: main 51#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 52#CHECK-NEXT: Function start line: 9 53#CHECK-NEXT: Line: 10 54#CHECK-NEXT: Column: 0 55 56#CHECK: 0x4005b9 57#CHECK-NEXT: foo 58#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 59#CHECK-NEXT: Function start line: 4 60#CHECK-NEXT: Line: 5 61#CHECK-NEXT: Column: 7 62#CHECK-NEXT: main 63#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 64#CHECK-NEXT: Function start line: 9 65#CHECK-NEXT: Line: 10 66#CHECK-NEXT: Column: 0 67#CHECK-NEXT: Discriminator: 2 68 69#CHECK: 0x4005ce 70#CHECK-NEXT: foo 71#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 72#CHECK-NEXT: Function start line: 4 73#CHECK-NEXT: Line: 5 74#CHECK-NEXT: Column: 17 75#CHECK-NEXT: Discriminator: 2 76#CHECK-NEXT: main 77#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 78#CHECK-NEXT: Function start line: 9 79#CHECK-NEXT: Line: 10 80#CHECK-NEXT: Column: 0 81#CHECK-NEXT: Discriminator: 2 82 83#CHECK: 0x4005d4 84#CHECK-NEXT: foo 85#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 86#CHECK-NEXT: Function start line: 4 87#CHECK-NEXT: Line: 5 88#CHECK-NEXT: Column: 30 89#CHECK-NEXT: Discriminator: 4 90#CHECK-NEXT: main 91#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c 92#CHECK-NEXT: Function start line: 9 93#CHECK-NEXT: Line: 10 94#CHECK-NEXT: Column: 0 95#CHECK-NEXT: Discriminator: 2 96 97#CHECK: some more text 98