[cfe-commits] r70779 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Daniel Dunbar
daniel at zuster.org
Sun May 3 07:22:15 PDT 2009
Author: ddunbar
Date: Sun May 3 09:22:14 2009
New Revision: 70779
URL: http://llvm.org/viewvc/llvm-project?rev=70779&view=rev
Log:
It turns out BuildAggrIvarLayout wasn't even using the shadow struct,
just computing it!
Modified:
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=70779&r1=70778&r2=70779&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sun May 3 09:22:14 2009
@@ -35,14 +35,6 @@
// don't belong in CGObjCRuntime either so we will live with it for
// now.
-static const llvm::StructType *
-GetConcreteClassStruct(CodeGen::CodeGenModule &CGM,
- const ObjCInterfaceDecl *OID) {
- assert(!OID->isForwardDecl() && "Invalid interface decl!");
- const RecordDecl *RD = CGM.getContext().addRecordToClass(OID);
- return cast<llvm::StructType>(CGM.getTypes().ConvertTagDeclType(RD));
-}
-
/// FindIvarInterface - Find the interface containing the ivar.
///
/// FIXME: We shouldn't need to do this, the containing context should
@@ -3117,9 +3109,7 @@
SkipIvars.clear();
IvarsInfo.clear();
- const llvm::StructLayout *Layout =
- CGM.getTargetData().getStructLayout(GetConcreteClassStruct(CGM, OI));
- BuildAggrIvarLayout(OI, Layout, 0, RecFields, 0, ForStrongLayout, hasUnion);
+ BuildAggrIvarLayout(OI, 0, 0, RecFields, 0, ForStrongLayout, hasUnion);
if (IvarsInfo.empty())
return llvm::Constant::getNullValue(PtrTy);
More information about the cfe-commits
mailing list