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

Nick Lewycky nicholas at mxc.ca
Sat Jul 4 11:03:30 PDT 2009


This doesn't work with my llvm-g++ on Linux:;

$ llvm-g++ test/FrontendC++/2009-06-30-ByrefBlock.cpp
test/FrontendC++/2009-06-30-ByrefBlock.cpp: In function 'void fubar()':
test/FrontendC++/2009-06-30-ByrefBlock.cpp:6: error: '__block' was not 
declared in this scope
test/FrontendC++/2009-06-30-ByrefBlock.cpp:6: error: expected `;' before 
'void'
test/FrontendC++/2009-06-30-ByrefBlock.cpp: In function 'void 
__fubar_block_invoke_1(void*)':
test/FrontendC++/2009-06-30-ByrefBlock.cpp:7: error: 'voodoo' was not 
declared in this scope

Should it be marked Apple-only? Or should we fix the Linux llvm-g++ 
build to turn blocks on?

Nick

Stuart Hastings wrote:
> 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;});
> +}
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 




More information about the llvm-commits mailing list