diff options
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 587ab8a357..23e922de6b 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1181,6 +1181,15 @@ llvm::DIType CGDebugInfo::getOrCreateRecordType(QualType RTy, return T; } +/// getOrCreateInterfaceType - Emit an objective c interface type standalone +/// debug info. +llvm::DIType CGDebugInfo::getOrCreateInterfaceType(QualType D, + SourceLocation Loc) { + llvm::DIType T = getOrCreateType(D, getOrCreateFile(Loc)); + DBuilder.retainType(T); + return T; +} + /// CreateType - get structure or union type. llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) { RecordDecl *RD = Ty->getDecl(); @@ -1282,6 +1291,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, RuntimeLang); return FwdDecl; } + ID = Def; // Bit size, align and offset of the type. @@ -1296,7 +1306,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, DBuilder.createStructType(Unit, ID->getName(), DefUnit, Line, Size, Align, Flags, llvm::DIArray(), RuntimeLang); - + // Otherwise, insert it into the CompletedTypeCache so that recursive uses // will find it and we're emitting the complete type. CompletedTypeCache[QualType(Ty, 0).getAsOpaquePtr()] = RealDecl; |