types. It is no longer needed now that the code generator
re-lays-out interfaces if they are defines after being laid out
from a forward decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68194
91177308-0d34-0410-b5e6-
96231b3b80d8
/// specified typename decl.
QualType getTypedefType(TypedefDecl *Decl);
QualType getObjCInterfaceType(ObjCInterfaceDecl *Decl);
- QualType buildObjCInterfaceType(ObjCInterfaceDecl *Decl);
QualType getTemplateTypeParmType(unsigned Depth, unsigned Index,
IdentifierInfo *Name = 0);
return QualType(Decl->TypeForDecl, 0);
}
-/// buildObjCInterfaceType - Returns a new type for the interface
-/// declaration, regardless. It also removes any previously built
-/// record declaration so caller can rebuild it.
-QualType ASTContext::buildObjCInterfaceType(ObjCInterfaceDecl *Decl) {
- RecordDecl *&RD = ASTRecordForInterface[Decl];
- if (RD)
- RD = 0;
- Decl->TypeForDecl = new(*this,8) ObjCInterfaceType(Type::ObjCInterface, Decl);
- Types.push_back(Decl->TypeForDecl);
- return QualType(Decl->TypeForDecl, 0);
-}
-
/// \brief Retrieve the template type parameter type for a template
/// parameter with the given depth, index, and (optionally) name.
QualType ASTContext::getTemplateTypeParmType(unsigned Depth, unsigned Index,
std::string Name = Decl->getNameAsString();
- QualType T = M->getContext().buildObjCInterfaceType(Decl);
+ QualType T = M->getContext().getObjCInterfaceType(Decl);
if (T->isIncompleteArrayType()) {
// CodeGen turns int[] into int[1] so we'll do the same here.
Interface->protocol_begin(),
Interface->protocol_end());
const llvm::Type *InterfaceTy =
- CGM.getTypes().ConvertType(CGM.getContext().buildObjCInterfaceType(Interface));
+ CGM.getTypes().ConvertType(CGM.getContext().getObjCInterfaceType(Interface));
unsigned Flags = eClassFlags_Factory;
unsigned Size = CGM.getTargetData().getTypePaddedSize(InterfaceTy);
SuperClassGV = GetClassGlobal(ObjCClassName + RootClassName);
}
// FIXME: Gross
- ObjCInterfaceDecl *Interface =
- const_cast<ObjCInterfaceDecl*>(ID->getClassInterface());
- CGM.getTypes().ConvertType(CGM.getContext().buildObjCInterfaceType(Interface));
InstanceStart = InstanceSize = 0;
if (ObjCInterfaceDecl *OID =
const_cast<ObjCInterfaceDecl*>(ID->getClassInterface())) {