diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-11-17 22:58:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-11-17 22:58:34 +0000 |
commit | 10bd36882406cdf4805e35add1ce2f11ab9ae152 (patch) | |
tree | dadf16647fecd2e461b2b18ae40f77dac201905b /lib/Basic/IdentifierTable.cpp | |
parent | 34265e7133ad82148aa9b3ac097ed66728f4ff85 (diff) |
Eliminate all of the placeholder identifiers used for constructors,
destructors, and conversion functions. The placeholders were used to
work around the fact that the parser and some of Sema really wanted
declarators to have simple identifiers; now, the code that deals with
declarators will use DeclarationNames.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | lib/Basic/IdentifierTable.cpp | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index b83266d1ff..38bdb7e630 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -42,8 +42,7 @@ IdentifierInfo::IdentifierInfo() { IdentifierTable::IdentifierTable(const LangOptions &LangOpts) // Start with space for 8K identifiers. - : HashTable(8192), - ConstructorId(0), DestructorId(0), ConversionFunctionId(0) { + : HashTable(8192) { // Populate the identifier table with info about keywords for the current // language. @@ -53,32 +52,7 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts) // This cstor is intended to be used only for serialization. IdentifierTable::IdentifierTable() - : HashTable(8192), - ConstructorId(0), DestructorId(0), ConversionFunctionId(0) { } - -/// getConstructorId - Return a placeholder identifier for a C++ -/// constructor. -IdentifierInfo &IdentifierTable::getConstructorId() { - if (!ConstructorId) - ConstructorId = &get("<constructor>"); - return *ConstructorId; -} - -/// getDestructorId - Return a placeholder identifier for a C++ -/// destructor. -IdentifierInfo &IdentifierTable::getDestructorId() { - if (!DestructorId) - DestructorId = &get("<destructor>"); - return *DestructorId; -} - -/// getConversionFunctionId - Return a placeholder identifier for a -/// C++ conversion function. -IdentifierInfo &IdentifierTable::getConversionFunctionId() { - if (!ConversionFunctionId) - ConversionFunctionId = &get("<conversion function>"); - return *ConversionFunctionId; -} + : HashTable(8192) { } //===----------------------------------------------------------------------===// // Language Keyword Implementation |