From: David Blaikie Date: Sun, 30 Jul 2017 17:16:32 +0000 (+0000) Subject: llvm-symbolizer: Make test portable using an explicit object file rather than the... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91f2df2a33129a5a0173a376ba459ed82c8bd3f4;p=llvm llvm-symbolizer: Make test portable using an explicit object file rather than the host compiler git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309517 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/tools/llvm-symbolizer/Inputs/print_context.o b/test/tools/llvm-symbolizer/Inputs/print_context.o new file mode 100644 index 00000000000..0424b376fcf Binary files /dev/null and b/test/tools/llvm-symbolizer/Inputs/print_context.o differ diff --git a/test/tools/llvm-symbolizer/print_context.c b/test/tools/llvm-symbolizer/print_context.c index 93f78df1846..5bc3b18c900 100644 --- a/test/tools/llvm-symbolizer/print_context.c +++ b/test/tools/llvm-symbolizer/print_context.c @@ -1,15 +1,3 @@ -// REQUIRES: x86_64-linux -// RUN: %host_cc -O0 -g %s -o %t 2>&1 -// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s - -// CHECK: inc -// CHECK: print_context.c:[[@LINE+9]] -// CHECK: [[@LINE+6]] : #include -// CHECK: [[@LINE+6]] : -// CHECK: [[@LINE+6]] >: int inc -// CHECK: [[@LINE+6]] : return -// CHECK: [[@LINE+6]] : } - #include int inc(int a) { @@ -21,3 +9,14 @@ int main() { return 0; } +// RUN: echo "%p/Inputs/print_context.o 0x0" | llvm-symbolizer -print-source-context-lines=5 | FileCheck %s + +// Inputs/print_context.o built with plain -g -c from this source file + +// CHECK: inc +// CHECK: print_context.c:3 +// CHECK: 1 : #include +// CHECK: 2 : +// CHECK: 3 >: int inc +// CHECK: 4 : return +// CHECK: 5 : }