summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Lex/Token.h4
-rw-r--r--clang/include/clang/Parse/Parser.h7
2 files changed, 6 insertions, 5 deletions
diff --git a/clang/include/clang/Lex/Token.h b/clang/include/clang/Lex/Token.h
index d5bfd9cdf59..474d4048d15 100644
--- a/clang/include/clang/Lex/Token.h
+++ b/clang/include/clang/Lex/Token.h
@@ -85,10 +85,6 @@ public:
IdentInfo = II;
}
- /// isNamedIdentifier - Return true if this token is a ppidentifier with the
- /// specified name. For example, tok.isNamedIdentifier("this").
- bool isNamedIdentifier(const char *Name) const;
-
/// setFlag - Set the specified flag.
void setFlag(TokenFlags Flag) {
Flags |= Flag;
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h
index cd63b9951c8..83ec0a7a8c2 100644
--- a/clang/include/clang/Parse/Parser.h
+++ b/clang/include/clang/Parse/Parser.h
@@ -51,6 +51,11 @@ class Parser {
enum { ScopeCacheSize = 16 };
unsigned NumCachedScopes;
Scope *ScopeCache[ScopeCacheSize];
+
+ /// Ident_super - IdentifierInfo for "super", to support fast
+ /// comparison.
+ IdentifierInfo *Ident_super;
+
public:
Parser(Preprocessor &PP, Action &Actions);
~Parser();
@@ -434,7 +439,7 @@ private:
if (Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope))
return true;
- return Tok.isNamedIdentifier("super");
+ return Tok.getIdentifierInfo() == Ident_super;
}
ExprResult ParseObjCAtExpression(SourceLocation AtLocation);
OpenPOWER on IntegriCloud