[cfe-dev] CABI project

John Wiegley johnw at boostpro.com
Sat Oct 20 08:42:56 PDT 2012


>>>>> João Matos <ripzonetriton at gmail.com> writes:

> I don't fully understand the scope of this library or what parts of Clang it
> will wrap / replace.

Imagine you have some language X and you want to call into a C library on
x86_64.  The rules for argument passing are complex enough that CreateCall
alone won't cut it.  Clang solves this problem for its users by implementing
that part of the x86_64 ABI in CodeGen; but what about all other LLVM users?

Now imagine you had a tidy library called LLVMabi or so, which, when combined
with LLVM, allows you to fully interop with any C++ library from any language.
This is the grail we're questing after -- and which currently doesn't exist in
any form I know of (even projects like libffi look to confine themselves to C
considerations only).

The other set of users this will benefit is folks who have a C++ front-end,
and want to use LLVM as their new back-end, but suddenly wake up and realize
that solving the ABI problem is an even bigger job than writing the type
translator and IR generator from their ASTs!  Further, it reaches into a
problem domain they may not have addressed yet for every platform the LLVMabi
would eventually target.

-- 
John Wiegley
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost




More information about the cfe-dev mailing list