diff options
author | Stuart Hastings <stuart@apple.com> | 2009-07-01 15:40:10 +0000 |
---|---|---|
committer | Stuart Hastings <stuart@apple.com> | 2009-07-01 15:40:10 +0000 |
commit | 75657ab707b53c35e86b14ec750ac0122c106192 (patch) | |
tree | 9e435116cdebf28fc885d999910b7f5d609aa970 /test/FrontendC++ | |
parent | 93696a38b709361aee960fd8537973205ea8cfef (diff) |
Insure that __block_holder_tmp is allocated on the stack when a byref
variable is present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendC++')
-rw-r--r-- | test/FrontendC++/2009-06-30-ByrefBlock.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/FrontendC++/2009-06-30-ByrefBlock.cpp b/test/FrontendC++/2009-06-30-ByrefBlock.cpp new file mode 100644 index 0000000000..6f8869c541 --- /dev/null +++ b/test/FrontendC++/2009-06-30-ByrefBlock.cpp @@ -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;}); +} |