summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-04-13 18:44:05 +0000
committerJohn McCall <rjmccall@apple.com>2012-04-13 18:44:05 +0000
commit38baeabb253f3e04d5b54bf834dbd9f5ebdc9e5c (patch)
tree0dfea5d768804337cc4514c616ab9699519e2012 /test
parent653b7cff0efe0d32ab12535846196e3465445fef (diff)
Don't enter cleanups for unreachable variables. It's impossible to
jump into these scopes, and the cleanup-entering code sometimes wants to do some operations first (e.g. a GEP), which can leave us with unparented IR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGenCXX/block-byref-cxx-objc.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/block-byref-cxx-objc.cpp b/test/CodeGenCXX/block-byref-cxx-objc.cpp
index 135e0c7551..30f1f074b9 100644
--- a/test/CodeGenCXX/block-byref-cxx-objc.cpp
+++ b/test/CodeGenCXX/block-byref-cxx-objc.cpp
@@ -23,3 +23,13 @@ int main()
// CHECK: call void @_Block_object_assign
// CHECK: define internal void @__destroy_helper_block_
// CHECK: call void @_Block_object_dispose
+
+// rdar://problem/11135650
+namespace test1 {
+ struct A { int x; A(); ~A(); };
+
+ void test() {
+ return;
+ __block A a;
+ }
+}