[cfe-commits] [PATCH] Make the Microsoft C++ name mangler use the right calling convention

John McCall rjmccall at apple.com
Mon Nov 8 22:43:03 PST 2010


On Nov 8, 2010, at 8:09 AM, Charles Davis wrote:
> In order to do this, I had to make the CXXABI.h header from AST public.
> I'm kinda leery about doing that, so I want some input before I commit.
> One alternative may be to add a similar method to the CGCXXABI object,
> but I don't like to duplicate code like that.

We're going to want ABI-specific hooks for performing member calls anyway.  I don't think it's unreasonable to duplicate ABI-specific knowledge about CC in the ABI-specific method for configuring the C-ABI function signature.

There is a good reason to expose this information in Sema, though, which is for compatibility testing (e.g. of member function pointers).  I would prefer to expose it as calls to the ASTContext, though, which can be implemented in terms of the C++ ABI object.  If we decide to expose the C++ ABI object later, we'll be free to do so.

John.






More information about the cfe-commits mailing list