Well, my use case is for doing name mangling correctly with the MS and Itanium manglers.<div><br></div><div>They take an ASTContext and get the existing CXXABI object to ask it some details like the default calling conventions for methods, so if the correct ABI object is not changed the mangled names will be incorrect. And parsing the code twice to get a different ASTContext with another ABI doesn't seem like a good idea.</div>

<div><br></div><div>Or maybe this can be refactored to extract the CXXABI out of the ASTContext, and inject it by external logic where it's needed.</div><div><br></div><div><div class="gmail_quote">On Sun, Aug 19, 2012 at 2:52 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What are the invariants on the setter? Is there even a time when it is<br>
makes sense to switch out the ABI member? If so, please clearly<br>
document when it makes sense to do so.<br>
<br>
--Sean Silva<br>
<div><div class="h5"><br>
On Sat, Aug 18, 2012 at 10:02 AM, Joćo Matos <<a href="mailto:ripzonetriton@gmail.com">ripzonetriton@gmail.com</a>> wrote:<br>
> Attached is a patch that provides a way to get / set the active C++ ABI<br>
> object on the AST context.<br>
><br>
> --<br>
> Joćo Matos<br>
><br>
</div></div>> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Joćo Matos<br>
</div>