summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-12-17 21:40:49 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-12-17 21:40:49 +0000
commitf327e89dabc34946f0086961b30813d4e25d22a5 (patch)
tree496f31158d1abae748194fc51ab809a842342c82 /clang/lib/CodeGen
parent3d1f552643159f6b9514d21e96b6de23bd3bbd70 (diff)
downloadbcm5719-llvm-f327e89dabc34946f0086961b30813d4e25d22a5.tar.gz
bcm5719-llvm-f327e89dabc34946f0086961b30813d4e25d22a5.zip
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. llvm-svn: 61154
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CodeGenTypes.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp
index 10b1e15ae39..e8a38a286b6 100644
--- a/clang/lib/CodeGen/CodeGenTypes.cpp
+++ b/clang/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));
}
OpenPOWER on IntegriCloud