blocks/lambdas in clang

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

blocks/lambdas in clang

david raila

Trying blocks on a x64 linux gives undefined reference to
`_NSConcreteGlobalBlock', am I missing a library
or something?

Alternatively, what are the plans/timetable for an implementation of
C++0x lambdas in clang?

Thanks.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: blocks/lambdas in clang

Blaine Garst
The compiler initializes the first word of every block to one of two symbols (the other being _NSConcreteStackBlock), that being one of them, so as to enable Objective-C treating blocks as objects if and when the objc runtime is loaded.  The blocks runtime for the most part ignores these values until such a time.  A block copy operation will use another symbol, so in total I think you'll need _NSConcreteMallocBlock also.
Blaine

On Jan 12, 2010, at 11:15 AM, david raila wrote:


Trying blocks on a x64 linux gives undefined reference to
`_NSConcreteGlobalBlock', am I missing a library
or something?

Alternatively, what are the plans/timetable for an implementation of
C++0x lambdas in clang?

Thanks.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: blocks/lambdas in clang

Chris Lattner

On Jan 12, 2010, at 1:26 PM, Blaine Garst wrote:

The compiler initializes the first word of every block to one of two symbols (the other being _NSConcreteStackBlock), that being one of them, so as to enable Objective-C treating blocks as objects if and when the objc runtime is loaded.  The blocks runtime for the most part ignores these values until such a time.  A block copy operation will use another symbol, so in total I think you'll need _NSConcreteMallocBlock also.

This runtime support code is available at http://compiler-rt.llvm.org/

-Chris


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: blocks/lambdas in clang

Sebastian Redl
In reply to this post by david raila
david raila wrote:
> Alternatively, what are the plans/timetable for an implementation of
> C++0x lambdas in clang?
>  
I'm not aware of anyone working on this feature, and "I'm working on it"
is basically the only plan/timetable for C++0x features that exists at
the moment. In other words, it will be implemented whenever someone
feels like implementing it.

Sebastian
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev