[llvm] r293785 - Add missing test cases from r293697/D29094
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 09:15:25 PST 2017
Author: dblaikie
Date: Wed Feb 1 11:15:24 2017
New Revision: 293785
URL: http://llvm.org/viewvc/llvm-project?rev=293785&view=rev
Log:
Add missing test cases from r293697/D29094
Differential Revision: https://reviews.llvm.org/D29368
Added:
llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim
llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.c
llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.inp
llvm/trunk/test/tools/llvm-symbolizer/sym-verbose.test
Added: llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim?rev=293785&view=auto
==============================================================================
Binary files llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim (added) and llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim Wed Feb 1 11:15:24 2017 differ
Added: llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.c?rev=293785&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.c (added)
+++ llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.c Wed Feb 1 11:15:24 2017
@@ -0,0 +1,8 @@
+static volatile int do_mul;
+static volatile int do_inc;
+
+int main () {
+ int x = 1;
+ if (do_mul) x *= 2; else x /= 2;
+ return do_inc ? ++x : --x;
+}
Added: llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.inp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.inp?rev=293785&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.inp (added)
+++ llvm/trunk/test/tools/llvm-symbolizer/Inputs/discrim.inp Wed Feb 1 11:15:24 2017
@@ -0,0 +1,5 @@
+some text
+0x4004f2
+0x400509
+0x40050d
+some more text
Added: llvm/trunk/test/tools/llvm-symbolizer/sym-verbose.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/sym-verbose.test?rev=293785&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-symbolizer/sym-verbose.test (added)
+++ llvm/trunk/test/tools/llvm-symbolizer/sym-verbose.test Wed Feb 1 11:15:24 2017
@@ -0,0 +1,36 @@
+#static volatile int do_mul;
+#static volatile int do_inc;
+#
+#int main () {
+# int x = 1;
+# if (do_mul) x *= 2; else x /= 2;
+# return do_inc ? ++x : --x;
+#}
+#Build as : clang -g -O2 discrim.c -o discrim
+
+RUN: llvm-symbolizer -verbose -print-address -obj=%p/Inputs/discrim < %p/Inputs/discrim.inp | FileCheck %s
+
+#CHECK: some text
+
+#CHECK: 0x4004f2
+#CHECK-NEXT: main
+#CHECK-NEXT: Filename: /tmp/discrim.c
+#CHECK-NEXT: Line: 6
+#CHECK-NEXT: Column: 7
+#CHECK-NOT: Discriminator: 0
+
+#CHECK: 0x400509
+#CHECK-NEXT: main
+#CHECK-NEXT: Filename: /tmp/discrim.c
+#CHECK-NEXT: Line: 7
+#CHECK-NEXT: Column: 3
+#CHECK-NEXT: Discriminator: 1
+
+#CHECK: 0x40050d
+#CHECK-NEXT: main
+#CHECK-NEXT: Filename: /tmp/discrim.c
+#CHECK-NEXT: Line: 7
+#CHECK-NEXT: Column: 3
+#CHECK-NEXT: Discriminator: 2
+
+#CHECK: some more text
More information about the llvm-commits
mailing list