[cfe-commits] [patch] CXXABI getter/setter

João Matos ripzonetriton at gmail.com
Sun Aug 19 15:50:16 PDT 2012


I am creating my own mangler instance. The problem is that it takes an AST
context, which has it's own CXXABI object, and it can't be changed.

And you are right, it's probably not correct under all the circumstances,
I'll change my code to make an AST for each different ABI. I had not
remembered about template parameters, that is a good reason.

By the way, is there any reason ABI dependent stuff could not be abstracted
from the actual AST? It just feels wasteful to have to parse code twice to
get layout and mangling information.

On Sun, Aug 19, 2012 at 10:41 PM, John McCall <rjmccall at apple.com> wrote:

> On Aug 19, 2012, at 2:55 AM, João Matos wrote:
> > Well, my use case is for doing name mangling correctly with the MS and
> Itanium manglers.
>
> You want to take an existing AST and apply both MS and Itanium manglings
> to it,
> regardless of which ABI it was parsed under?  I think the correct approach
> is to
> explicitly create your own mangler instance, rather than relying on the
> information
> from the ASTContext to make one.
>
> Whether this is actually sensible depends on what you're really trying to
> do.
> Sean's point that the ABI can substantially affect the AST isn't just
> notional —
> most of the time, things like sizes aren't mangled, but if they're used as
> a
> template argument they certainly will be.
>
> John.




-- 
João Matos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120819/af5b8f0d/attachment.html>


More information about the cfe-commits mailing list