aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 7b7c2fbd05..a80274a690 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -37,8 +37,8 @@ const llvm::StructType *
CGObjCRuntime::GetConcreteClassStruct(CodeGen::CodeGenModule &CGM,
const ObjCInterfaceDecl *OID) {
assert(!OID->isForwardDecl() && "Invalid interface decl!");
- QualType T = CGM.getContext().getObjCInterfaceType(OID);
- return cast<llvm::StructType>(CGM.getTypes().ConvertType(T));
+ const RecordDecl *RD = CGM.getContext().addRecordToClass(OID);
+ return cast<llvm::StructType>(CGM.getTypes().ConvertTagDeclType(RD));
}
uint64_t CGObjCRuntime::ComputeIvarBaseOffset(CodeGen::CodeGenModule &CGM,
@@ -71,6 +71,11 @@ LValue CGObjCRuntime::EmitValueForIvarAtOffset(CodeGen::CodeGenFunction &CGF,
const ObjCIvarDecl *Ivar,
unsigned CVRQualifiers,
llvm::Value *Offset) {
+ // Force generation of the codegen information for this structure.
+ //
+ // FIXME: Remove once we don't use the bit-field lookup map.
+ (void) GetConcreteClassStruct(CGF.CGM, OID);
+
// FIXME: For now, we use an implementation based on just computing
// the offset and calculating things directly. For optimization
// purposes, it would be cleaner to use a GEP on the proper type