3 # static inline int inctwo (int *a) {
4 # printf ("%d\n",(*a)++);
7 # static inline int inc (int *a) {
8 # printf ("%d\n",inctwo(a));
18 # Build as : clang -g -O2 addr.c
20 RUN: llvm-symbolizer --print-address --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
21 RUN: llvm-symbolizer --addresses --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
22 RUN: llvm-symbolizer -a --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
28 CHECK-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:3:3
30 CHECK-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:7:0
32 CHECK-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:14:0
37 RUN: llvm-symbolizer --inlining --print-address --pretty-print --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
38 RUN: llvm-symbolizer --inlining --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
39 RUN: llvm-symbolizer --inlines --print-address --pretty-print --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
40 RUN: llvm-symbolizer --inlines --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
41 RUN: llvm-symbolizer -i --print-address --pretty-print --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
42 RUN: llvm-symbolizer -i --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
44 # Before 2020-08-04, asan_symbolize.py passed --inlining=true.
45 # Support this compatibility alias for a while.
46 RUN: llvm-symbolizer --inlining=true --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
49 PRETTY: {{[0x]+}}40054d: inctwo at {{[/\]+}}tmp{{[/\]+}}x.c:3:3
50 PRETTY: (inlined by) inc at {{[/\]+}}tmp{{[/\]+}}x.c:7:0
51 PRETTY: (inlined by) main at {{[/\]+}}tmp{{[/\]+}}x.c:14:0
54 RUN: llvm-addr2line --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix=A2L %s
55 RUN: llvm-addr2line -a --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_A %s
56 RUN: llvm-addr2line -f --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_F %s
57 RUN: llvm-addr2line -i --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_I %s
58 RUN: llvm-addr2line -fi --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_F,A2L_I,A2L_FI %s
60 RUN: llvm-addr2line -pa --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_A %s
61 RUN: llvm-addr2line -pf --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_F %s
62 RUN: llvm-addr2line -paf --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_AF %s
63 RUN: llvm-addr2line -pai --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_A,A2LP_I %s
64 RUN: llvm-addr2line -pfi --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_F,A2LP_FI %s
65 RUN: llvm-addr2line -pafi --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_AF,A2LP_FI %s
70 A2L-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:3{{$}}
72 A2L_I-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:7{{$}}
74 A2L_I-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:14{{$}}
79 A2LP_A-NEXT: 0x40054d: {{[/\]+}}tmp{{[/\]+}}x.c:3{{$}}
80 A2LP_F-NEXT: inctwo at {{[/\]+}}tmp{{[/\]+}}x.c:3{{$}}
81 A2LP_AF-NEXT: 0x40054d: inctwo at {{[/\]+}}tmp{{[/\]+}}x.c:3{{$}}
82 A2LP_I-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:7{{$}}
83 A2LP_I-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:14{{$}}
84 A2LP_FI-NEXT: (inlined by) inc at {{[/\]+}}tmp{{[/\]+}}x.c:7{{$}}
85 A2LP_FI-NEXT: (inlined by) main at {{[/\]+}}tmp{{[/\]+}}x.c:14{{$}}