diff options
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 10b1e15ae3..e8a38a286b 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -273,13 +273,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { // We are issuing warnings elsewhere! ObjCInterfaceType OIT = cast<ObjCInterfaceType>(Ty); ObjCInterfaceDecl *ID = OIT.getDecl(); - RecordDecl *RD = ID->getRecordForDecl(); - if(!RD) { - // Sometimes, class type is being directly generated in code gen for - // built-in class types. - ID->addRecordToClass(Context); - RD = ID->getRecordForDecl(); - } + const RecordDecl *RD = Context.addRecordToClass(ID); return ConvertTagDeclType(cast<TagDecl>(RD)); } |