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.

llvm-svn: 60063
This commit is contained in:
Daniel Dunbar 2008-11-25 23:05:24 +00:00
parent 32ef8ceaa1
commit 762e77b55f
1 changed files with 2 additions and 1 deletions

View File

@ -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: