2015-10-13 03:26:44 +08:00
|
|
|
#Source:
|
|
|
|
##include <stdio.h>
|
2015-11-12 01:47:54 +08:00
|
|
|
#static inline int inctwo (int *a) {
|
2015-10-13 03:26:44 +08:00
|
|
|
# printf ("%d\n",(*a)++);
|
|
|
|
# return (*a)++;
|
|
|
|
#}
|
2015-11-12 01:47:54 +08:00
|
|
|
#static inline int inc (int *a) {
|
|
|
|
# printf ("%d\n",inctwo(a));
|
|
|
|
# return (*a)++;
|
|
|
|
#}
|
|
|
|
#
|
2015-10-13 03:26:44 +08:00
|
|
|
#
|
|
|
|
#int main () {
|
|
|
|
# int x = 1;
|
|
|
|
# return inc(&x);
|
|
|
|
#}
|
2015-11-12 01:47:54 +08:00
|
|
|
#
|
2015-10-13 03:26:44 +08:00
|
|
|
#Build as : clang -g -O2 addr.c
|
|
|
|
|
2015-11-12 01:47:54 +08:00
|
|
|
RUN: llvm-symbolizer -print-address -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
|
|
|
|
RUN: llvm-symbolizer -inlining -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck --check-prefix="PRETTY" %s
|
2015-10-13 03:26:44 +08:00
|
|
|
|
|
|
|
#CHECK: 0x40054d
|
|
|
|
#CHECK: main
|
2015-11-12 01:47:54 +08:00
|
|
|
#CHECK: {{[/\]+}}tmp{{[/\]+}}x.c:14:0
|
|
|
|
#
|
|
|
|
#PRETTY: {{[0x]+}}40054d: inctwo at {{[/\]+}}tmp{{[/\]+}}x.c:3:3
|
|
|
|
#PRETTY: (inlined by) inc at {{[/\]+}}tmp{{[/\]+}}x.c:7:0
|
|
|
|
#PRETTY (inlined by) main at {{[/\]+}}tmp{{[/\]+}}x.c:14:0
|
2015-10-13 03:26:44 +08:00
|
|
|
|