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

Stuart Hastings stuart at apple.com
Mon Jul 6 08:42:43 PDT 2009


On Jul 5, 2009, at 5:09 PM, Bill Wendling wrote:

> This should probably have these lines:
>
> // XFAIL: *
> // XTARGET: darwin
>
> -bw
>
> On Jul 4, 2009, at 11:03 AM, Nick Lewycky wrote:
>
>> This doesn't work with my llvm-g++ on Linux:;

My apologies.

>> $ 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?

I think this should be marked Apple-only, until everybody else decides  
to support Apple's "blocks" concept.  :-)

Thank you to BIll; I've applied your patch.

stuart

>> 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
>>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-dev mailing list