[llvm-commits] [llvm] r74610 - /llvm/trunk/test/FrontendC++/2009-06-30-ByrefBlock.cpp

Stuart Hastings stuart at apple.com
Wed Jul 1 08:40:10 PDT 2009


Author: stuart
Date: Wed Jul  1 10:40:10 2009
New Revision: 74610

URL: http://llvm.org/viewvc/llvm-project?rev=74610&view=rev
Log:
Insure that __block_holder_tmp is allocated on the stack when a byref
variable is present.

Added:
    llvm/trunk/test/FrontendC++/2009-06-30-ByrefBlock.cpp

Added: llvm/trunk/test/FrontendC++/2009-06-30-ByrefBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC%2B%2B/2009-06-30-ByrefBlock.cpp?rev=74610&view=auto

==============================================================================
--- llvm/trunk/test/FrontendC++/2009-06-30-ByrefBlock.cpp (added)
+++ llvm/trunk/test/FrontendC++/2009-06-30-ByrefBlock.cpp Wed Jul  1 10:40:10 2009
@@ -0,0 +1,8 @@
+// Insure __block_holder_tmp is allocated on the stack.
+// RUN: %llvmgxx %s -S -O2 -o - | egrep {__block_holder_tmp.*alloca}
+// <rdar://problem/5865221>
+extern void fubar_dispatch_sync(void (^PP)(void));
+void fubar() {
+  __block void *voodoo;
+ fubar_dispatch_sync(^(void){voodoo=0;});
+}





More information about the llvm-commits mailing list