[llvm] r309517 - llvm-symbolizer: Make test portable using an explicit object file rather than the host compiler

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 30 10:16:32 PDT 2017


Author: dblaikie
Date: Sun Jul 30 10:16:32 2017
New Revision: 309517

URL: http://llvm.org/viewvc/llvm-project?rev=309517&view=rev
Log:
llvm-symbolizer: Make test portable using an explicit object file rather than the host compiler

Added:
    llvm/trunk/test/tools/llvm-symbolizer/Inputs/print_context.o
Modified:
    llvm/trunk/test/tools/llvm-symbolizer/print_context.c

Added: llvm/trunk/test/tools/llvm-symbolizer/Inputs/print_context.o
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/Inputs/print_context.o?rev=309517&view=auto
==============================================================================
Binary files llvm/trunk/test/tools/llvm-symbolizer/Inputs/print_context.o (added) and llvm/trunk/test/tools/llvm-symbolizer/Inputs/print_context.o Sun Jul 30 10:16:32 2017 differ

Modified: llvm/trunk/test/tools/llvm-symbolizer/print_context.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/print_context.c?rev=309517&r1=309516&r2=309517&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-symbolizer/print_context.c (original)
+++ llvm/trunk/test/tools/llvm-symbolizer/print_context.c Sun Jul 30 10:16:32 2017
@@ -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 <stdio.h>
 
 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  : }




More information about the llvm-commits mailing list