[PATCH] Test case for bug 19437.

Diego Novillo dnovillo at google.com
Thu Apr 17 10:57:09 PDT 2014


Hi echristo, dblaikie,

This depends on D3413.

http://reviews.llvm.org/D3414

Files:
  test/CodeGen/dwarf4-discriminators.c

Index: test/CodeGen/dwarf4-discriminators.c
===================================================================
--- /dev/null
+++ test/CodeGen/dwarf4-discriminators.c
@@ -0,0 +1,10 @@
+// Test that disciminators are only added for DWARF 4 and later.
+
+// RUN: %clang -target x86_64-linux-gnu -g -S -o - %s | FileCheck %s --check-prefix=LINUX
+// RUN: %clang -target x86_64-apple-darwin -g -S -o - %s | FileCheck %s --check-prefix=DARWIN
+int foo(long i) {
+  if (i < 5) return 2; else return 90;
+}
+// LINUX:  .loc    1 {{[0-9]+}} 0 discriminator 1   #
+// LINUX:  .loc    1 {{[0-9]+}} 0 discriminator 2   #
+// DARWIN: .loc    1 {{[0-9]+}} 0 prologue_end      #
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3414.1.patch
Type: text/x-patch
Size: 665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140417/8003a961/attachment.bin>


More information about the cfe-commits mailing list