[cfe-dev] "Blocks" in Clang (aka closures)
steve naroff
snaroff at apple.com
Fri Dec 12 07:28:02 PST 2008
On Dec 11, 2008, at 7:24 PM, jp bonn wrote:
> Eli Friedman wrote:
>> On Tue, Dec 9, 2008 at 4:11 PM, jp bonn <jp at jpbonn.com> wrote:
>>
>>> Chris Lattner wrote:
>>>
>>>> Hi All,
>>>>
>>>> Steve has started working on an implementation of a language
>>>> feature
>>>> named 'Blocks'. The back story on this was that it was
>>>> prototyped in
>>>> an private Clang fork (because it is much easier to experiment with
>>>> clang than with GCC), then implemented in GCC (where it evolved a
>>>> lot), and now we're re-implementing it in Clang. The language
>>>> feature
>>>> is already supported by mainline llvm-gcc, but we don't have up-to-
>>>> date documentation for it. When that documentation is updated, it
>>>> will definitely be checked into the main clang repo (in clang/
>>>> docs).
>>>>
>>> I noticed some commits for "blocks" support in Clang but the
>>> documentation hasn't been committed yet. Are blocks supported in
>>> Clang?
>>>
>>
>> If I recall correctly, the parsing and semantic analysis are
>> basically
>> complete, and there's the -rewrite-blocks option to clang to
>> transform
>> C code with blocks into equivalent code without them, but there isn't
>> any native CodeGen support yet.
>>
>> -Eli
>>
> Are the examples supposed to run using llvm-gcc on OSX? I'm getting
> undefined symbols e.g. __NSConcreteStackBlock using the llvm-gcc
> testsuite. I'm assuming that's part of the "small runtime"
> and it's not out yet.
>
Your assumption is correct.
snaroff
> JP
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list