diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-11-25 23:05:24 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-11-25 23:05:24 +0000 |
commit | ab4c91c708ca0c7d80f513af74926271e25b2f56 (patch) | |
tree | 3276d520716525e1006458f3df2fc2d2647e1259 /lib/Parse/ParseDecl.cpp | |
parent | ad3d6917dabbdab3399ff8307240aad58247d2e3 (diff) |
Only call TryAnnotateScopeToken when parsing C++.
- This improves -parse-noop of Carbon.h by +2%, and I believe
compensates for the majority of the performance regression in r58913.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index d8894c66fa..278c80f72c 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -426,7 +426,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS) { // Only annotate C++ scope. Allow class-name as an identifier in case // it's a constructor. - TryAnnotateScopeToken(); + if (getLang().CPlusPlus) + TryAnnotateScopeToken(); switch (Tok.getKind()) { default: |