Remove dead DeclarationName constructors that involving knowing about the
internal implementation of Selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66996 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/DeclarationName.h b/include/clang/AST/DeclarationName.h
index bc9f674..77e5024 100644
--- a/include/clang/AST/DeclarationName.h
+++ b/include/clang/AST/DeclarationName.h
@@ -132,26 +132,6 @@
     Ptr |= StoredDeclarationNameExtra;
   }
 
-  // Construct a declaration name from a zero- or one-argument
-  // Objective-C selector.
-  DeclarationName(IdentifierInfo *II, unsigned numArgs) 
-    : Ptr(reinterpret_cast<uintptr_t>(II)) {
-    assert((Ptr & PtrMask) == 0 && "Improperly aligned IdentifierInfo");
-    assert(numArgs < 2 && "Use MultiKeywordSelector for >= 2 arguments");
-    if (numArgs == 0)
-      Ptr |= StoredObjCZeroArgSelector;
-    else
-      Ptr |= StoredObjCOneArgSelector;
-  }
-
-  // Construct a declaration name from an Objective-C multiple-keyword
-  // selector.
-  DeclarationName(MultiKeywordSelector *SI)
-    : Ptr(reinterpret_cast<uintptr_t>(SI)) {
-    assert((Ptr & PtrMask) == 0 && "Improperly aligned MultiKeywordSelector");
-    Ptr |= StoredDeclarationNameExtra;
-  }
-
   /// Construct a declaration name from a raw pointer.
   DeclarationName(uintptr_t Ptr) : Ptr(Ptr) { }
 
diff --git a/lib/AST/DeclarationName.cpp b/lib/AST/DeclarationName.cpp
index c1077c1..3815a08 100644
--- a/lib/AST/DeclarationName.cpp
+++ b/lib/AST/DeclarationName.cpp
@@ -63,16 +63,19 @@
   switch (Sel.getNumArgs()) {
   case 0:
     Ptr = reinterpret_cast<uintptr_t>(Sel.getAsIdentifierInfo());
+    assert((Ptr & PtrMask) == 0 && "Improperly aligned IdentifierInfo");
     Ptr |= StoredObjCZeroArgSelector;
     break;
 
   case 1:
     Ptr = reinterpret_cast<uintptr_t>(Sel.getAsIdentifierInfo());
+    assert((Ptr & PtrMask) == 0 && "Improperly aligned IdentifierInfo");
     Ptr |= StoredObjCOneArgSelector;
     break;
 
   default:
     Ptr = Sel.InfoPtr & ~Selector::ArgFlags;
+    assert((Ptr & PtrMask) == 0 && "Improperly aligned MultiKeywordSelector");
     Ptr |= StoredDeclarationNameExtra;
     break;
   }