[cfe-dev] RFC: Removing ABIArgInfo::Expand from Clang ABI lowering

John McCall rjmccall at apple.com
Tue Feb 3 21:40:10 PST 2015


Hey, all.  I’d like to remove ABIArgInfo::Expand from Clang’s function lowering logic.  It is essentially ABIArgInfo::Direct except (1) it is less flexible about the actual types to coerce to and (2) it requires some awkward redundant code to do recursive walks through types.  The redundancy can be fixed, but I’d rather just remove the code completely.

In principle, Expand can be used to expand structures with internal padding, but in practice nobody seems to be using it that way, probably because structures like that tend to be passed on the stack or need some other careful handling.

I’ve looked at our currently-supported in-tree uses of Expand, and I feel confident that they can all be easily switched to Direct.  However, I am willing to maintain Expand if anyone is maintaining an out-of-tree target and cannot simply switch to Direct, or if anyone has some other compelling reason Expand needs to stay.  Otherwise, I’ll be removing it relatively soon.

John.



More information about the cfe-dev mailing list