mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
a5bc6713d8
Summary: relates https://bugs.llvm.org/show_bug.cgi?id=44443 Adding missing newline when printing bad input values. Fix testcase Reviewers: jhenderson Reviewed By: jhenderson Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72313
84 lines
3.9 KiB
Plaintext
84 lines
3.9 KiB
Plaintext
#Source:
|
|
##include <stdio.h>
|
|
#static inline int inctwo (int *a) {
|
|
# printf ("%d\n",(*a)++);
|
|
# return (*a)++;
|
|
#}
|
|
#static inline int inc (int *a) {
|
|
# printf ("%d\n",inctwo(a));
|
|
# return (*a)++;
|
|
#}
|
|
#
|
|
#
|
|
#int main () {
|
|
# int x = 1;
|
|
# return inc(&x);
|
|
#}
|
|
#
|
|
#Build as : clang -g -O2 addr.c
|
|
|
|
RUN: llvm-symbolizer -print-address -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
|
|
RUN: llvm-symbolizer -addresses -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
|
|
RUN: llvm-symbolizer -a -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
|
|
RUN: llvm-symbolizer -inlining -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
|
RUN: llvm-symbolizer -inlines -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
|
RUN: llvm-symbolizer -inlines -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
|
RUN: llvm-symbolizer -i -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
|
RUN: llvm-symbolizer -i -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
|
RUN: echo "0x1" > %t.input
|
|
RUN: llvm-symbolizer -obj=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
|
|
|
|
RUN: llvm-addr2line -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix=A2L %s
|
|
RUN: llvm-addr2line -a -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_A %s
|
|
RUN: llvm-addr2line -f -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_F %s
|
|
RUN: llvm-addr2line -i -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_I %s
|
|
RUN: llvm-addr2line -fi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_F,A2L_I,A2L_FI %s
|
|
|
|
RUN: llvm-addr2line -pa -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_A %s
|
|
RUN: llvm-addr2line -pf -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_F %s
|
|
RUN: llvm-addr2line -paf -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_AF %s
|
|
RUN: llvm-addr2line -pai -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_A,A2LP_I %s
|
|
RUN: llvm-addr2line -pfi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_F,A2LP_FI %s
|
|
RUN: llvm-addr2line -pafi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_AF,A2LP_FI %s
|
|
|
|
# CHECK: some text
|
|
# CHECK-NEXT: 0x40054d
|
|
# CHECK-NEXT: inctwo
|
|
# CHECK-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:3:3
|
|
# CHECK-NEXT: inc
|
|
# CHECK-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:7:0
|
|
# CHECK-NEXT: main
|
|
# CHECK-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:14:0
|
|
# CHECK-EMPTY:
|
|
# CHECK-NEXT: some text2
|
|
#
|
|
#PRETTY: some text
|
|
#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
|
|
#PRETTY: some text2
|
|
#
|
|
#ZERO: ??
|
|
#ZERO: ??:0:0
|
|
#
|
|
#A2L: some text
|
|
#A2L_A-NEXT: 0x40054d
|
|
#A2L_F-NEXT: inctwo
|
|
#A2L-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:3{{$}}
|
|
#A2L_FI-NEXT: inc{{$}}
|
|
#A2L_I-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:7{{$}}
|
|
#A2L_FI-NEXT: main
|
|
#A2L_I-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:14{{$}}
|
|
#A2L-NEXT: some text2
|
|
|
|
#A2LP: some text
|
|
#A2LP_A-NEXT: 0x40054d: {{[/\]+}}tmp{{[/\]+}}x.c:3{{$}}
|
|
#A2LP_F-NEXT: inctwo at {{[/\]+}}tmp{{[/\]+}}x.c:3{{$}}
|
|
#A2LP_AF-NEXT: 0x40054d: inctwo at {{[/\]+}}tmp{{[/\]+}}x.c:3{{$}}
|
|
#A2LP_I-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:7{{$}}
|
|
#A2LP_I-NEXT: {{[/\]+}}tmp{{[/\]+}}x.c:14{{$}}
|
|
#A2LP_FI-NEXT: (inlined by) inc at {{[/\]+}}tmp{{[/\]+}}x.c:7{{$}}
|
|
#A2LP_FI-NEXT: (inlined by) main at {{[/\]+}}tmp{{[/\]+}}x.c:14{{$}}
|
|
#A2LP-NEXT: some text2
|