diff options
author | John McCall <rjmccall@apple.com> | 2011-03-24 11:26:52 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-03-24 11:26:52 +0000 |
commit | 084e83dfe7e4e531fda9abefa5396c643ffc2a36 (patch) | |
tree | 5b07f08a394c9337d65db0201f296f9811d6fca4 /clang/lib/Parse/Parser.cpp | |
parent | 33f352ca62f608b71497b1a89015a2149cf16b0f (diff) | |
download | bcm5719-llvm-084e83dfe7e4e531fda9abefa5396c643ffc2a36.tar.gz bcm5719-llvm-084e83dfe7e4e531fda9abefa5396c643ffc2a36.zip |
Insomniac refactoring: change how the parser allocates attributes so that
AttributeLists do not accumulate over the lifetime of parsing, but are
instead reused. Also make the arguments array not require a separate
allocation, and make availability attributes store their stuff in
augmented memory, too.
llvm-svn: 128209
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index f18531ebbab..4cdf2deec34 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -441,7 +441,7 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result) { return true; } - ParsedAttributesWithRange attrs; + ParsedAttributesWithRange attrs(AttrFactory); MaybeParseCXX0XAttributes(attrs); MaybeParseMicrosoftAttributes(attrs); @@ -839,7 +839,7 @@ void Parser::ParseKNRParamDeclarations(Declarator &D) { SourceLocation DSStart = Tok.getLocation(); // Parse the common declaration-specifiers piece. - DeclSpec DS; + DeclSpec DS(AttrFactory); ParseDeclarationSpecifiers(DS); // C99 6.9.1p6: 'each declaration in the declaration list shall have at |