diff options
author | John McCall <rjmccall@apple.com> | 2012-04-13 18:44:05 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-04-13 18:44:05 +0000 |
commit | 8c38d35b058c11c72951e7d71de268738853c682 (patch) | |
tree | 86f1a59ed157e54b11f792f48c8b9b8134d45040 /clang/test/CodeGenCXX/block-byref-cxx-objc.cpp | |
parent | cbbdaa9378c568c983a476b3e527557a4c76aa69 (diff) | |
download | bcm5719-llvm-8c38d35b058c11c72951e7d71de268738853c682.tar.gz bcm5719-llvm-8c38d35b058c11c72951e7d71de268738853c682.zip |
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.
llvm-svn: 154684
Diffstat (limited to 'clang/test/CodeGenCXX/block-byref-cxx-objc.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/block-byref-cxx-objc.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/block-byref-cxx-objc.cpp b/clang/test/CodeGenCXX/block-byref-cxx-objc.cpp index 135e0c75519..30f1f074b9b 100644 --- a/clang/test/CodeGenCXX/block-byref-cxx-objc.cpp +++ b/clang/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; + } +} |