summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-02-23 18:36:16 +0000
committerSteve Naroff <snaroff@apple.com>2009-02-23 18:36:16 +0000
commit91362dd011072cc910e7374dca8fcf7d90f411b4 (patch)
treea8004514c23b7e2410023e36187ad6b0cbb5bf7e /clang/lib/AST
parente7a0a63a16b7a83c30e9f3d09022554fd43685f2 (diff)
downloadbcm5719-llvm-91362dd011072cc910e7374dca8fcf7d90f411b4.tar.gz
bcm5719-llvm-91362dd011072cc910e7374dca8fcf7d90f411b4.zip
Revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244.
Remove support for "Class<P>". Will be making this an error. llvm-svn: 65332
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTContext.cpp25
-rw-r--r--clang/lib/AST/ExprConstant.cpp3
-rw-r--r--clang/lib/AST/Type.cpp27
3 files changed, 2 insertions, 53 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 78f2a8a9ab5..60d8b8be801 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1397,29 +1397,6 @@ QualType ASTContext::getObjCQualifiedIdType(ObjCProtocolDecl **Protocols,
return QualType(QType, 0);
}
-/// getObjCQualifiedClassType - Return an ObjCQualifiedIdType for the 'Class'
-/// decl and the conforming protocol list.
-QualType ASTContext::getObjCQualifiedClassType(ObjCProtocolDecl **Protocols,
- unsigned NumProtocols) {
- // Sort the protocol list alphabetically to canonicalize it.
- SortAndUniqueProtocols(Protocols, NumProtocols);
-
- llvm::FoldingSetNodeID ID;
- ObjCQualifiedIdType::Profile(ID, Protocols, NumProtocols);
-
- void *InsertPos = 0;
- if (ObjCQualifiedClassType *QT =
- ObjCQualifiedClassTypes.FindNodeOrInsertPos(ID, InsertPos))
- return QualType(QT, 0);
-
- // No Match;
- ObjCQualifiedClassType *QType =
- new (*this,8) ObjCQualifiedClassType(Protocols, NumProtocols);
- Types.push_back(QType);
- ObjCQualifiedClassTypes.InsertNode(QType, InsertPos);
- return QualType(QType, 0);
-}
-
/// getTypeOfExpr - Unlike many "get<Type>" functions, we can't unique
/// TypeOfExpr AST's (since expression's are never shared). For example,
/// multiple declarations that refer to "typeof(x)" all contain different
@@ -2422,7 +2399,7 @@ bool ASTContext::isObjCNSObjectType(QualType Ty) const {
/// to struct), Interface* (pointer to ObjCInterfaceType) and id<P> (qualified
/// ID type).
bool ASTContext::isObjCObjectPointerType(QualType Ty) const {
- if (Ty->isObjCQualifiedIdType() || Ty->isObjCQualifiedClassType())
+ if (Ty->isObjCQualifiedIdType())
return true;
// Blocks are objects.
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index d868cba9eb0..bfba5984b03 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -285,8 +285,7 @@ public:
static bool HasPointerEvalType(const Expr* E) {
return E->getType()->isPointerType()
|| E->getType()->isBlockPointerType()
- || E->getType()->isObjCQualifiedIdType()
- || E->getType()->isObjCQualifiedClassType();
+ || E->getType()->isObjCQualifiedIdType();
}
static bool EvaluatePointer(const Expr* E, APValue& Result, EvalInfo &Info) {
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp
index 065b626930b..7b07b9cbe40 100644
--- a/clang/lib/AST/Type.cpp
+++ b/clang/lib/AST/Type.cpp
@@ -870,17 +870,6 @@ void ObjCQualifiedIdType::Profile(llvm::FoldingSetNodeID &ID) {
Profile(ID, &Protocols[0], getNumProtocols());
}
-void ObjCQualifiedClassType::Profile(llvm::FoldingSetNodeID &ID,
- ObjCProtocolDecl **protocols,
- unsigned NumProtocols) {
- for (unsigned i = 0; i != NumProtocols; i++)
- ID.AddPointer(protocols[i]);
-}
-
-void ObjCQualifiedClassType::Profile(llvm::FoldingSetNodeID &ID) {
- Profile(ID, &Protocols[0], getNumProtocols());
-}
-
/// LookThroughTypedefs - Return the ultimate type this typedef corresponds to
/// potentially looking through *all* consequtive typedefs. This returns the
/// sum of the type qualifiers, so if you have:
@@ -1357,22 +1346,6 @@ void ObjCQualifiedIdType::getAsStringInternal(std::string &InnerString) const {
InnerString = ObjCQIString + InnerString;
}
-void ObjCQualifiedClassType::getAsStringInternal(std::string &InnerString) const
-{
- if (!InnerString.empty()) // Prefix the basic type, e.g. 'typedefname X'.
- InnerString = ' ' + InnerString;
- std::string ObjCQIString = "Class";
- ObjCQIString += '<';
- int num = getNumProtocols();
- for (int i = 0; i < num; i++) {
- ObjCQIString += getProtocols(i)->getNameAsString();
- if (i < num-1)
- ObjCQIString += ',';
- }
- ObjCQIString += '>';
- InnerString = ObjCQIString + InnerString;
-}
-
void TagType::getAsStringInternal(std::string &InnerString) const {
if (!InnerString.empty()) // Prefix the basic type, e.g. 'typedefname X'.
InnerString = ' ' + InnerString;
OpenPOWER on IntegriCloud