[cfe-dev] CABI project
Joe Groff
arcata at gmail.com
Tue Oct 16 15:43:38 PDT 2012
On Tue, Oct 16, 2012 at 2:35 PM, John McCall <rjmccall at apple.com> wrote:
>
> On Oct 16, 2012, at 2:24 PM, Dave Abrahams wrote:
>
>>
>> on Tue Oct 16 2012, John McCall <rjmccall-AT-apple.com> wrote:
>>
>>> On Oct 16, 2012, at 12:11 PM, Dave Abrahams wrote:
>>>> on Tue Oct 16 2012, John McCall <rjmccall-AT-apple.com> wrote:
>>>>> On Oct 16, 2012, at 11:45 AM, Dave Abrahams wrote:
>>>>>> I'm working on a project to separate from Clang all the logic necessary
>>>>>> to generate C/C++/ObjC-ABI-compatible code so that other front-ends,
>>>>>> both C family (e.g. Dragonegg, and in BoostPro's case, EDG) and other
>>>>>> languages/code generators, can interoperate with C family code.
>>>>>
>>>>> So, specifically, this would be some sort of API where you give it a C
>>>>> function type and it tells you how to pass those arguments in LLVM IR?
>>>>
>>>> Oh, way more than that. It has to deal with exception-handling, object
>>>> layout, vtable layout, yada yada... and probably a few
>>>> ObjectiveC-specific things I don't know about (not being versed in
>>>> ObjC).
>>>
>>> Oh, uh, that's an enormous project.
>>
>> Quite so.
>>
>>> In what way, precisely, is this not a proposal to reinvent all of
>>> IR-generation as another level of abstraction?
>>
>> I'm not sure whether it amounts to that, but I suppose it could
>> eventually end up there, in the long-term. Initially I'm interested in
>> abstracting out enough to handle C, which I think mostly just amounts to
>> what you said above, i.e. argument passing, (and, I guess, varargs
>> interpretation).
>
> I think that's a good problem space to work in, and it's one that could
> be extremely useful to a large number of projects (including clang).
A good place to start would be to factor out just the C ABI support
from Clang, which is a much smaller project than the C++ ABI and would
still be hugely useful.
-Joe
More information about the cfe-dev
mailing list