diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp index 06fee78e2ea2..d5daad51925f 100644 --- a/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/clang/lib/CodeGen/CodeGenTypes.cpp @@ -333,16 +333,17 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { return ConvertTypeRecursive(QualType(cast(Ty).getBaseType(), 0)); + case Type::ObjCQualifiedInterface: { + // Lower foo just like foo. + ObjCInterfaceDecl *ID = cast(Ty).getDecl(); + return ConvertTypeRecursive(Context.getObjCInterfaceType(ID)); + } + case Type::ObjCInterface: { ObjCInterfaceDecl *ID = cast(Ty).getDecl(); return ConvertTagDeclType(Context.addRecordToClass(ID)); } - case Type::ObjCQualifiedInterface: { - ObjCInterfaceDecl *ID = cast(Ty).getDecl(); - return ConvertTypeRecursive(Context.getObjCInterfaceType(ID)); - } - case Type::ObjCQualifiedId: case Type::ObjCQualifiedClass: // Protocols don't influence the LLVM type. diff --git a/clang/lib/CodeGen/CodeGenTypes.h b/clang/lib/CodeGen/CodeGenTypes.h index bdf0ac6d0255..b408ff66a6a8 100644 --- a/clang/lib/CodeGen/CodeGenTypes.h +++ b/clang/lib/CodeGen/CodeGenTypes.h @@ -153,8 +153,6 @@ public: bool IsVariadic); const CGRecordLayout *getCGRecordLayout(const TagDecl*) const; - /// Returns a StructType representing an Objective-C object - const llvm::Type *ConvertObjCInterfaceToStruct(const ObjCInterfaceDecl *OID); /// getLLVMFieldNo - Return llvm::StructType element number /// that corresponds to the field FD.