[cfe-commits] r60063 - /cfe/trunk/lib/Parse/ParseDecl.cpp
Daniel Dunbar
daniel at zuster.org
Tue Nov 25 15:05:24 PST 2008
Author: ddunbar
Date: Tue Nov 25 17:05:24 2008
New Revision: 60063
URL: http://llvm.org/viewvc/llvm-project?rev=60063&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Parse/ParseDecl.cpp
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=60063&r1=60062&r2=60063&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Nov 25 17:05:24 2008
@@ -426,7 +426,8 @@
// 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:
More information about the cfe-commits
mailing list