<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Aug 27, 2013, at 1:20 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">On Tue, Aug 27, 2013 at 11:55 AM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@gmail.com" target="_blank">rjmccall@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Aug 20, 2013, at 4:59 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
> - Use MangleNumeringContext for the guard variable bit index.<br>
<br>
</div>This mostly looks good.<br>
<br>
+ virtual ~MangleNumberingContext();<br>
+<br>
<br>
You should leave this defined inline. No need to worry about anchoring the v-table because, as an abstract class, it’s likely that all references to the v-table will be dropped after optimization.<br></blockquote><div><br>
</div><div>OK. That was my concern. :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
// -- the bodies of non-exported nonspecialized template functions<br>
// -- the bodies of inline functions<br>
+ // -- the bodies of regular functions in the Microsoft ABI<br>
if ((IsInNonspecializedTemplate &&<br>
!(ManglingContextDecl && isa<ParmVarDecl>(ManglingContextDecl))) ||<br>
- isInInlineFunction(CurContext)) {<br>
+ isInInlineFunction(CurContext) ||<br>
+ (isa<FunctionDecl>(CurContext) &&<br>
+ Context.getTargetInfo().getCXXABI().isMicrosoft())) {<br>
ManglingContextDecl = 0;<br>
return &Context.getManglingNumberContext(DC);<br>
<br>
You should just pull this entire decision into the AST CXXABI.<br></blockquote><div><br></div><div>The AST CXXABI interface isn't exposed to Sema. Currently, Sema asks the ASTContext for things like the default method calling convention, and the context forwards the call into CXXABI. I'll go this route for now.</div>
<div><br></div><div>Should I move lib/AST/CXXABI.h up to include/clang/AST/CXXABI.h as a followup?</div></div></div></div></blockquote><div><br></div></div>No, I would continue to hide the CXXABI interface. Querying the ASTContext is the right thing to do.<div><br></div><div>John.</div></body></html>