[cfe-dev] Passing StructType arguments directly

John McCall rjmccall at apple.com
Sun Sep 18 02:21:41 PDT 2011


On Sep 17, 2011, at 3:49 PM, David Meyer wrote:
> I am working with Ivan Krasin on the PNaCl target in Clang. Our ABI
> requires that aggregates are passed as first class types in bitcode.

Your ABI requires a specific IR representation?  One which the LLVM core developers are trying to strongly discourage?

Anyway, this step is not actually bypassable;  there is just not any code in Clang to pass structs as true FCAs.  You could probably convince Clang to pass your structure using byval, if that would be good enough.  Otherwise, you'll probably have to add a whole new style of argument passing.

John.



More information about the cfe-dev mailing list