forked from OSchip/llvm-project
parent
647cffba61
commit
87bc387f8f
|
@ -728,21 +728,19 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
|
|||
SuperClassName = SuperClassDecl->getNameAsString();
|
||||
|
||||
// Get the class name
|
||||
ObjCInterfaceDecl * ClassDecl = (ObjCInterfaceDecl*)OID->getClassInterface();
|
||||
ObjCInterfaceDecl *ClassDecl =
|
||||
const_cast<ObjCInterfaceDecl *>(OID->getClassInterface());
|
||||
std::string ClassName = ClassDecl->getNameAsString();
|
||||
|
||||
// This is required by newer ObjC runtimes.
|
||||
assert(!LateBoundIVars() &&"Late-bound instance variables not yet supported");
|
||||
|
||||
// Get the size of instances. For runtimes that support late-bound instances
|
||||
// this should probably be something different (size just of instance
|
||||
// varaibles in this class, not superclasses?).
|
||||
int instanceSize = 0;
|
||||
const llvm::Type *ObjTy = 0;
|
||||
if (!LateBoundIVars()) {
|
||||
ObjTy = CGM.getTypes().ConvertType(Context.getObjCInterfaceType(ClassDecl));
|
||||
instanceSize = CGM.getTargetData().getTypePaddedSize(ObjTy);
|
||||
} else {
|
||||
// This is required by newer ObjC runtimes.
|
||||
assert(0 && "Late-bound instance variables not yet supported");
|
||||
}
|
||||
const llvm::Type *ObjTy =
|
||||
CGM.getTypes().ConvertType(Context.getObjCInterfaceType(ClassDecl));
|
||||
int instanceSize = CGM.getTargetData().getTypePaddedSize(ObjTy);
|
||||
|
||||
// Collect information about instance variables.
|
||||
llvm::SmallVector<llvm::Constant*, 16> IvarNames;
|
||||
|
|
|
@ -99,7 +99,7 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T) {
|
|||
}
|
||||
|
||||
const llvm::Type *CodeGenTypes::ConvertTypeRecursive(QualType T) {
|
||||
T = Context.getCanonicalType(T);;
|
||||
T = Context.getCanonicalType(T);
|
||||
|
||||
// See if type is already cached.
|
||||
llvm::DenseMap<Type *, llvm::PATypeHolder>::iterator
|
||||
|
|
Loading…
Reference in New Issue