aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-08-16 23:50:35 +0000
committerEric Christopher <echristo@apple.com>2012-08-16 23:50:35 +0000
commitc076ef6dd87d4507ac4f276ec4d7881fb6f2a7fd (patch)
tree6f180996a8ddac1f9d8d21c0b47af4618be4b2b9 /lib/CodeGen/CGDebugInfo.cpp
parent1a30edb995924b007044ca7abd97d7fbea22007f (diff)
Make isa part of objc_object at metadata generation time.
Noticed on inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 00127ac72f..eec3b57b94 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -366,17 +366,19 @@ llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT) {
llvm::DIType ISATy = DBuilder.createPointerType(OCTy, Size);
- SmallVector<llvm::Value *, 16> EltTys;
+ llvm::MDNode *ObjTy = DBuilder.createStructType(TheCU, "objc_object",
+ getOrCreateMainFile(),
+ 0, 0, 0, 0, llvm::DIArray());
+ SmallVector<llvm::Value *, 1> EltTys;
llvm::DIType FieldTy =
- DBuilder.createMemberType(getOrCreateMainFile(), "isa",
+ DBuilder.createMemberType(llvm::DIDescriptor(ObjTy), "isa",
getOrCreateMainFile(), 0, Size,
0, 0, 0, ISATy);
EltTys.push_back(FieldTy);
llvm::DIArray Elements = DBuilder.getOrCreateArray(EltTys);
-
- return DBuilder.createStructType(TheCU, "objc_object",
- getOrCreateMainFile(),
- 0, 0, 0, 0, Elements);
+
+ ObjTy->replaceOperandWith(10, Elements);
+ return llvm::DIType(ObjTy);
}
case BuiltinType::ObjCSel: {
return