[cfe-dev] "Blocks" in Clang (aka closures)
jp bonn
jp at jpbonn.com
Thu Dec 11 16:24:23 PST 2008
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.
JP
More information about the cfe-dev
mailing list