diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-17 21:40:49 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-17 21:40:49 +0000 |
commit | a769c004a2874504c17ea8afccbc4ad35fc33c9f (patch) | |
tree | 8b99e51cf54df41037797a650475ecd17322fa53 /lib/CodeGen/CodeGenTypes.cpp | |
parent | b60d7999d621fce608e03d39e82c0e7eda750054 (diff) |
This patch will build the Records lazily per Steve's comments.
Note that one test duplicate-ivar-check.m will fail because I
need to re-implement duplicate ivar checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61154 91177308-0d34-0410-b5e6-96231b3b80d8
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)); } |