summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/debug-info-block-end.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-07-11 01:49:26 +0000
committerEric Christopher <echristo@apple.com>2012-07-11 01:49:26 +0000
commit2977378974fa8a9a0338dd36cf5b7b0e5d3c1d77 (patch)
treebfad44c829d557a2e9f972c40b5022351cb5e180 /clang/test/CodeGen/debug-info-block-end.c
parent296a710b5bd6a6e236ea7d47a6c437d62711e465 (diff)
downloadbcm5719-llvm-2977378974fa8a9a0338dd36cf5b7b0e5d3c1d77.tar.gz
bcm5719-llvm-2977378974fa8a9a0338dd36cf5b7b0e5d3c1d77.zip
The end of a block doesn't necessarily need a line table entry unless
there's something going on there. Remove the unconditional line entry and only add one if we're emitting cleanups (any other statements would be handled normally). Fixes rdar://9199234 llvm-svn: 160033
Diffstat (limited to 'clang/test/CodeGen/debug-info-block-end.c')
-rw-r--r--clang/test/CodeGen/debug-info-block-end.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/CodeGen/debug-info-block-end.c b/clang/test/CodeGen/debug-info-block-end.c
new file mode 100644
index 00000000000..72e8868bb46
--- /dev/null
+++ b/clang/test/CodeGen/debug-info-block-end.c
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -g -S -emit-llvm %s -o - | FileCheck %s
+
+int bar();
+
+int foo(int i) {
+ int j = 0;
+ if (i) {
+ j = bar();
+ }
+ else {
+ j = bar() + 2;
+ }
+ return j;
+}
+
+// Make sure we don't have a line table entry for a block with no cleanups.
+// CHECK-NOT: i32 9, i32 3, metadata
OpenPOWER on IntegriCloud