[cfe-commits] r69783 - in /cfe/trunk: 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

Chris Lattner sabre at nondot.org
Tue Apr 21 23:50:37 PDT 2009


Author: lattner
Date: Wed Apr 22 01:50:37 2009
New Revision: 69783

URL: http://llvm.org/viewvc/llvm-project?rev=69783&view=rev
Log:
ObjCQualifiedClass is dead, remove it.

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

Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Wed Apr 22 01:50:37 2009
@@ -1872,50 +1872,6 @@
     
 };
   
-/// 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.

Modified: cfe/trunk/include/clang/AST/TypeNodes.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeNodes.def?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/TypeNodes.def (original)
+++ cfe/trunk/include/clang/AST/TypeNodes.def Wed Apr 22 01:50:37 2009
@@ -78,7 +78,6 @@
 TYPE(ObjCInterface, Type)
 TYPE(ObjCQualifiedInterface, ObjCInterfaceType)
 TYPE(ObjCQualifiedId, Type)
-TYPE(ObjCQualifiedClass, Type)
 
 #undef DEPENDENT_TYPE
 #undef NON_CANONICAL_TYPE

Modified: cfe/trunk/include/clang/Frontend/PCHBitCodes.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/PCHBitCodes.h?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/include/clang/Frontend/PCHBitCodes.h (original)
+++ cfe/trunk/include/clang/Frontend/PCHBitCodes.h Wed Apr 22 01:50:37 2009
@@ -317,9 +317,7 @@
       /// \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

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Wed Apr 22 01:50:37 2009
@@ -431,7 +431,6 @@
     // 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 @@
   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!

Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Wed Apr 22 01:50:37 2009
@@ -768,8 +768,7 @@
          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

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Apr 22 01:50:37 2009
@@ -582,7 +582,6 @@
   case Type::MemberPointer:
   case Type::TemplateSpecialization:
   case Type::QualifiedName:
-  case Type::ObjCQualifiedClass:
     // Unsupported types
     return llvm::DIType();
 

Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Wed Apr 22 01:50:37 2009
@@ -378,7 +378,6 @@
   }
       
   case Type::ObjCQualifiedId:
-  case Type::ObjCQualifiedClass:
     // Protocols don't influence the LLVM type.
     return ConvertTypeRecursive(Context.getObjCIdType());
 

Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Wed Apr 22 01:50:37 2009
@@ -2103,13 +2103,7 @@
       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();
 }

Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Wed Apr 22 01:50:37 2009
@@ -228,14 +228,6 @@
   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
 //===----------------------------------------------------------------------===//

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=69783&r1=69782&r2=69783&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Wed Apr 22 01:50:37 2009
@@ -540,14 +540,6 @@
   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.





More information about the cfe-commits mailing list