[PATCH] [ms-cxxabi] Implement guard variables for static initialization
John McCall
rjmccall at gmail.com
Tue Aug 27 11:55:10 PDT 2013
On Aug 20, 2013, at 4:59 PM, Reid Kleckner <rnk at google.com> wrote:
> - Use MangleNumeringContext for the guard variable bit index.
This mostly looks good.
+ virtual ~MangleNumberingContext();
+
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.
// -- the bodies of non-exported nonspecialized template functions
// -- the bodies of inline functions
+ // -- the bodies of regular functions in the Microsoft ABI
if ((IsInNonspecializedTemplate &&
!(ManglingContextDecl && isa<ParmVarDecl>(ManglingContextDecl))) ||
- isInInlineFunction(CurContext)) {
+ isInInlineFunction(CurContext) ||
+ (isa<FunctionDecl>(CurContext) &&
+ Context.getTargetInfo().getCXXABI().isMicrosoft())) {
ManglingContextDecl = 0;
return &Context.getManglingNumberContext(DC);
You should just pull this entire decision into the AST CXXABI.
John.
More information about the cfe-commits
mailing list