aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r--lib/Basic/IdentifierTable.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp
index 38bdb7e630..1bef76688c 100644
--- a/lib/Basic/IdentifierTable.cpp
+++ b/lib/Basic/IdentifierTable.cpp
@@ -28,7 +28,6 @@ using namespace clang;
IdentifierInfo::IdentifierInfo() {
TokenID = tok::identifier;
ObjCOrBuiltinID = 0;
- OperatorID = 0;
HasMacro = false;
IsExtension = false;
IsPoisoned = false;
@@ -47,7 +46,6 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts)
// Populate the identifier table with info about keywords for the current
// language.
AddKeywords(LangOpts);
- AddOverloadedOperators();
}
// This cstor is intended to be used only for serialization.
@@ -163,26 +161,6 @@ void IdentifierTable::AddKeywords(const LangOptions &LangOpts) {
#include "clang/Basic/TokenKinds.def"
}
-/// addOperatorPrefix - Add the prefix "operator" (possible with a
-/// space after it) to the given operator symbol, and return the
-/// result.
-static std::string addOperatorPrefix(const char* Symbol) {
- std::string result = "operator";
- if (Symbol[0] >= 'a' && Symbol[0] <= 'z')
- result += ' ';
- result += Symbol;
- return result;
-}
-
-/// AddOverloadedOperators - Register the name of all C++ overloadable
-/// operators ("operator+", "operator[]", etc.)
-void IdentifierTable::AddOverloadedOperators() {
-#define OVERLOADED_OPERATOR(Name,Spelling,Token, Unary, Binary, MemberOnly) \
- OverloadedOperators[OO_##Name] = &get(addOperatorPrefix(Spelling)); \
- OverloadedOperators[OO_##Name]->setOverloadedOperatorID(OO_##Name);
-#include "clang/Basic/OperatorKinds.def"
-}
-
tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const {
// We use a perfect hash function here involving the length of the keyword,
// the first and third character. For preprocessor ID's there are no