summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-08-17 22:54:57 +0000
committerEric Christopher <echristo@apple.com>2012-08-17 22:54:57 +0000
commitff5760132d992c109f71e1bfed555fed046a243e (patch)
tree79d11684b39227e5ba5e4a016b446ddf05a5e38b /clang/lib
parentc459b5178c2a6c189713c686aba3068f79eea0d8 (diff)
downloadbcm5719-llvm-ff5760132d992c109f71e1bfed555fed046a243e.tar.gz
bcm5719-llvm-ff5760132d992c109f71e1bfed555fed046a243e.zip
Reapply:
Make isa part of objc_object at metadata generation time. Noticed on inspection. llvm-svn: 162145
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index fd1c7a33980..d537d5172ed 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -368,17 +368,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
OpenPOWER on IntegriCloud