]> granicus.if.org Git - clang/commitdiff
ObjCQualifiedClass is dead, remove it.
authorChris Lattner <sabre@nondot.org>
Wed, 22 Apr 2009 06:50:37 +0000 (06:50 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 22 Apr 2009 06:50:37 +0000 (06:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69783 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Type.h
include/clang/AST/TypeNodes.def
include/clang/Frontend/PCHBitCodes.h
lib/AST/ASTContext.cpp
lib/AST/Type.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CodeGenTypes.cpp
lib/Frontend/PCHReader.cpp
lib/Frontend/PCHWriter.cpp
lib/Sema/SemaTemplateInstantiate.cpp

index d5d607fde9517c8e6291a07caadb9ae859522769..19f12adb7dd96471a16ff575c1fceaaa1e361380 100644 (file)
@@ -1872,50 +1872,6 @@ public:
     
 };
   
-/// ObjCQualifiedClassType - to represent Class<protocol-list>.
-///
-/// Duplicate protocols are removed and protocol list is canonicalized to be in
-/// alphabetical order.
-class ObjCQualifiedClassType : public Type,
-                               public llvm::FoldingSetNode {
-  // List of protocols for this protocol conforming 'id' type
-  // List is sorted on protocol name. No protocol is enterred more than once.
-  llvm::SmallVector<ObjCProtocolDecl*, 8> Protocols;
-    
-  ObjCQualifiedClassType(ObjCProtocolDecl **Protos, unsigned NumP)
-    : Type(ObjCQualifiedClass, QualType()/*these are always canonical*/,
-           /*Dependent=*/false), 
-  Protocols(Protos, Protos+NumP) { }
-  friend class ASTContext;  // ASTContext creates these.
-public:
-    
-  ObjCProtocolDecl *getProtocols(unsigned i) const {
-    return Protocols[i];
-  }
-  unsigned getNumProtocols() const {
-    return Protocols.size();
-  }
-  ObjCProtocolDecl **getReferencedProtocols() {
-    return &Protocols[0];
-  }
-                              
-  typedef llvm::SmallVector<ObjCProtocolDecl*, 8>::const_iterator qual_iterator;
-  qual_iterator qual_begin() const { return Protocols.begin(); }
-  qual_iterator qual_end() const   { return Protocols.end(); }
-    
-  virtual void getAsStringInternal(std::string &InnerString) const;
-    
-  void Profile(llvm::FoldingSetNodeID &ID);
-  static void Profile(llvm::FoldingSetNodeID &ID,
-                      ObjCProtocolDecl **protocols, unsigned NumProtocols);
-    
-  static bool classof(const Type *T) { 
-    return T->getTypeClass() == ObjCQualifiedClass; 
-  }
-  static bool classof(const ObjCQualifiedClassType *) { return true; }
-    
-};
-
 // Inline function definitions.
 
 /// getUnqualifiedType - Return the type without any qualifiers.
index e98ff4200f6663208e97b3e638cda7b1d8037fe0..a14d85027ae6d70e82395a23e285fe608e07e0dd 100644 (file)
@@ -78,7 +78,6 @@ DEPENDENT_TYPE(Typename, Type)
 TYPE(ObjCInterface, Type)
 TYPE(ObjCQualifiedInterface, ObjCInterfaceType)
 TYPE(ObjCQualifiedId, Type)
-TYPE(ObjCQualifiedClass, Type)
 
 #undef DEPENDENT_TYPE
 #undef NON_CANONICAL_TYPE
index d40e970e07aafe0761acb734ef3ba0b7de27e2e1..41369b37d70cf701c32b4c31d607729dd8e4cabc 100644 (file)
@@ -317,9 +317,7 @@ namespace clang {
       /// \brief An ObjCQualifiedInterfaceType record.
       TYPE_OBJC_QUALIFIED_INTERFACE = 22,
       /// \brief An ObjCQualifiedIdType record.
-      TYPE_OBJC_QUALIFIED_ID        = 23,
-      /// \brief An ObjCQualifiedClassType record.
-      TYPE_OBJC_QUALIFIED_CLASS     = 24
+      TYPE_OBJC_QUALIFIED_ID        = 23
     };
 
     /// \brief The type IDs for special types constructed by semantic
index 02bedcaf78155b5a4c4c503bfe558900d841fea4..1e553e3aba3d0b23a5bcb7fef5adf11ef2301eb1 100644 (file)
@@ -431,7 +431,6 @@ ASTContext::getTypeInfo(const Type *T) {
     // alignment requirements: getPointerInfo should take an AddrSpace.
     return getTypeInfo(QualType(cast<ExtQualType>(T)->getBaseType(), 0));
   case Type::ObjCQualifiedId:
-  case Type::ObjCQualifiedClass:
   case Type::ObjCQualifiedInterface:
     Width = Target.getPointerWidth(0);
     Align = Target.getPointerAlign(0);
@@ -3136,9 +3135,6 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS) {
   case Type::FixedWidthInt:
     // Distinct fixed-width integers are not compatible.
     return QualType();
-  case Type::ObjCQualifiedClass:
-    // Distinct qualified classes are not compatible.
-    return QualType();
   case Type::ExtQual:
     // FIXME: ExtQual types can be compatible even if they're not
     // identical!
index 97245c699a4941d9a7be128c2152cbac81e518ec..7daa20704b22c18ba23bd2742d8839f51c63d8f7 100644 (file)
@@ -768,8 +768,7 @@ bool Type::isScalarType() const {
          isa<BlockPointerType>(CanonicalType) ||
          isa<MemberPointerType>(CanonicalType) ||
          isa<ComplexType>(CanonicalType) ||
-         isa<ObjCQualifiedIdType>(CanonicalType) ||
-         isa<ObjCQualifiedClassType>(CanonicalType);
+         isa<ObjCQualifiedIdType>(CanonicalType);
 }
 
 /// \brief Determines whether the type is a C++ aggregate type or C
index 1c6043b7d647ad70dba10c3b892fab2ecd4ac199..ae8214e24aba2766782863245854eef822e861f4 100644 (file)
@@ -582,7 +582,6 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty,
   case Type::MemberPointer:
   case Type::TemplateSpecialization:
   case Type::QualifiedName:
-  case Type::ObjCQualifiedClass:
     // Unsupported types
     return llvm::DIType();
 
index 5d98b453ac7c51160c051f92a2ff3a34f1256252..24f4885970283d3f5e8a4c142d17b2ccf924b427 100644 (file)
@@ -378,7 +378,6 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
   }
       
   case Type::ObjCQualifiedId:
-  case Type::ObjCQualifiedClass:
     // Protocols don't influence the LLVM type.
     return ConvertTypeRecursive(Context.getObjCIdType());
 
index 3a311d49c242adc9e6b9113d7e68f5654f707940..8e1118cb7f72bfcb116c3c37a1fa82d46a99419f 100644 (file)
@@ -2103,13 +2103,7 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) {
       Protos.push_back(cast<ObjCProtocolDecl>(GetDecl(Record[Idx++])));
     return Context.getObjCQualifiedIdType(&Protos[0], NumProtos);
   }
-
-  case pch::TYPE_OBJC_QUALIFIED_CLASS:
-    // FIXME: Deserialize ObjCQualifiedClassType
-    assert(false && "Cannot de-serialize ObjC qualified class types yet");
-    return QualType();
   }
-
   // Suppress a GCC warning
   return QualType();
 }
index 760578164b3a9d48ff5aaf3220963c945c4a8510..f34323c1604c71d1d589ab712d99ceb7ecfc121f 100644 (file)
@@ -228,14 +228,6 @@ void PCHTypeWriter::VisitObjCQualifiedIdType(const ObjCQualifiedIdType *T) {
   Code = pch::TYPE_OBJC_QUALIFIED_ID;
 }
 
-void 
-PCHTypeWriter::VisitObjCQualifiedClassType(const ObjCQualifiedClassType *T) {
-  Record.push_back(T->getNumProtocols());
-  for (unsigned I = 0, N = T->getNumProtocols(); I != N; ++I)
-    Writer.AddDeclRef(T->getProtocols(I), Record);
-  Code = pch::TYPE_OBJC_QUALIFIED_CLASS;
-}
-
 //===----------------------------------------------------------------------===//
 // Declaration serialization
 //===----------------------------------------------------------------------===//
index 1a67fd124849997b2131f4b679a107868730dd84..bd385d355bc6c13cc412205f7476c7c6829b7b0a 100644 (file)
@@ -540,14 +540,6 @@ InstantiateObjCQualifiedIdType(const ObjCQualifiedIdType *T,
   return QualType();
 }
 
-QualType 
-TemplateTypeInstantiator::
-InstantiateObjCQualifiedClassType(const ObjCQualifiedClassType *T,
-                                  unsigned Quals) const {
-  assert(false && "Objective-C types cannot be dependent");
-  return QualType();
-}
-
 /// \brief The actual implementation of Sema::InstantiateType().
 QualType TemplateTypeInstantiator::Instantiate(QualType T) const {
   // If T is not a dependent type, there is nothing to do.