[PATCH] [-cxx-abi microsoft] Implement local manglings accurately
Reid Kleckner
rnk at google.com
Fri Dec 13 14:33:57 PST 2013
LGTM if a helper (Parser::getManageScopeFlags(bool C99OrCXX, const Token &Tok)?) is added for computing flags when making a ParseScope.
================
Comment at: include/clang/AST/MangleNumberingContext.h:36
@@ -34,2 +35,3 @@
: public RefCountedBase<MangleNumberingContext> {
+ unsigned NumStaticLocals;
llvm::DenseMap<const Type *, unsigned> ManglingNumbers;
----------------
Is this dead now?
================
Comment at: lib/AST/MangleNumberingContext.cpp:42
@@ +41,3 @@
+MangleNumberingContext::getStaticLocalNumber(const VarDecl *VD) {
+ // FIXME: Compute a BlockPointerType? Not obvious how.
+ const Type *Ty = 0;
----------------
Is this comment relevant given that we're not taking a BlockDecl?
================
Comment at: lib/Parse/ParseStmt.cpp:1080-1085
@@ -1079,3 +1079,8 @@
//
- ParseScope InnerScope(this, Scope::DeclScope,
- C99orCXX && Tok.isNot(tok::l_brace));
+ ManageScopeFlags ManageScope = NoScope;
+ if (C99orCXX) {
+ ManageScope = EnteredScope;
+ if (Tok.is(tok::l_brace))
+ ManageScope = BeforeCompoundStmt;
+ }
+ ParseScope InnerScope(this, Scope::DeclScope, ManageScope);
----------------
Can you write a helper that computes these flags in the common case?
http://llvm-reviews.chandlerc.com/D2204
More information about the cfe-commits
mailing list