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
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index baa5104..048fafb 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1440,8 +1440,7 @@
     // a normal identifier.
     if (getLang().CPlusPlus && 
         Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope))
-      D.SetConstructor(Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope),
-                       &PP.getIdentifierTable().getConstructorId(), 
+      D.setConstructor(Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope),
                        Tok.getLocation());
     else
       D.SetIdentifier(Tok.getIdentifierInfo(), Tok.getLocation());
@@ -1452,8 +1451,7 @@
     SourceLocation TildeLoc = ConsumeToken();
     if (Tok.is(tok::identifier)) {
       if (TypeTy *Type = ParseClassName())
-        D.SetDestructor(Type, &PP.getIdentifierTable().getDestructorId(), 
-                        TildeLoc);
+        D.setDestructor(Type, TildeLoc);
       else
         D.SetIdentifier(0, TildeLoc);
     } else {
@@ -1469,9 +1467,7 @@
     } else {
       // This must be a conversion function (C++ [class.conv.fct]).
       if (TypeTy *ConvType = ParseConversionFunctionId()) {
-        D.SetConversionFunction(ConvType, 
-                                &PP.getIdentifierTable().getConversionFunctionId(), 
-                                OperatorLoc);
+        D.setConversionFunction(ConvType, OperatorLoc);
       }
     }
   } else if (Tok.is(tok::l_paren) && SS.isEmpty()) {
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 752d552..48ced22 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -454,7 +454,7 @@
     // Parse the first declarator.
     ParseDeclarator(DeclaratorInfo);
     // Error parsing the declarator?
-    if (DeclaratorInfo.getIdentifier() == 0) {
+    if (!DeclaratorInfo.hasName()) {
       // If so, skip until the semi-colon or a }.
       SkipUntil(tok::r_brace, true);
       if (Tok.is(tok::semi))
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index ee4cd7b..3b36ebe 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -424,7 +424,7 @@
   Declarator DeclaratorInfo(DS, Declarator::FileContext);
   ParseDeclarator(DeclaratorInfo);
   // Error parsing the declarator?
-  if (DeclaratorInfo.getIdentifier() == 0) {
+  if (!DeclaratorInfo.hasName()) {
     // If so, skip until the semi-colon or a }.
     SkipUntil(tok::r_brace, true);
     if (Tok.is(tok::semi))