summaryrefslogtreecommitdiffstats
path: root/lib/AST/DeclarationName.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/DeclarationName.cpp')
-rw-r--r--lib/AST/DeclarationName.cpp55
1 files changed, 2 insertions, 53 deletions
diff --git a/lib/AST/DeclarationName.cpp b/lib/AST/DeclarationName.cpp
index 64924ad..28188d9 100644
--- a/lib/AST/DeclarationName.cpp
+++ b/lib/AST/DeclarationName.cpp
@@ -135,33 +135,6 @@ int DeclarationName::compare(DeclarationName LHS, DeclarationName RHS) {
} // end namespace clang
-DeclarationName::DeclarationName(Selector Sel) {
- if (!Sel.getAsOpaquePtr()) {
- Ptr = 0;
- return;
- }
-
- 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;
- }
-}
-
DeclarationName::NameKind DeclarationName::getNameKind() const {
switch (getStoredNameKind()) {
case StoredIdentifier: return Identifier;
@@ -305,28 +278,10 @@ IdentifierInfo *DeclarationName::getCXXLiteralIdentifier() const {
return 0;
}
-Selector DeclarationName::getObjCSelector() const {
- switch (getNameKind()) {
- case ObjCZeroArgSelector:
- return Selector(reinterpret_cast<IdentifierInfo *>(Ptr & ~PtrMask), 0);
-
- case ObjCOneArgSelector:
- return Selector(reinterpret_cast<IdentifierInfo *>(Ptr & ~PtrMask), 1);
-
- case ObjCMultiArgSelector:
- return Selector(reinterpret_cast<MultiKeywordSelector *>(Ptr & ~PtrMask));
-
- default:
- break;
- }
-
- return Selector();
-}
-
-void *DeclarationName::getFETokenInfoAsVoid() const {
+void *DeclarationName::getFETokenInfoAsVoidSlow() const {
switch (getNameKind()) {
case Identifier:
- return getAsIdentifierInfo()->getFETokenInfo<void>();
+ llvm_unreachable("Handled by getFETokenInfo()");
case CXXConstructorName:
case CXXDestructorName:
@@ -481,12 +436,6 @@ DeclarationNameTable::getCXXLiteralOperatorName(IdentifierInfo *II) {
return DeclarationName(LiteralName);
}
-unsigned
-llvm::DenseMapInfo<clang::DeclarationName>::
-getHashValue(clang::DeclarationName N) {
- return DenseMapInfo<void*>::getHashValue(N.getAsOpaquePtr());
-}
-
DeclarationNameLoc::DeclarationNameLoc(DeclarationName Name) {
switch (Name.getNameKind()) {
case DeclarationName::Identifier:
OpenPOWER on IntegriCloud