Improve the caching of debuginfo Objective C interface types.
Generate forward declarations that are RAUW'd by finalize().
We thus avoid outputting the same type several times in multiple
stages of completion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176820 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index 9650f2e..2e896cf 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -66,6 +66,9 @@
llvm::DenseMap<void *, std::pair<llvm::WeakVH, unsigned > >
ObjCInterfaceCache;
+ /// RetainedTypes - list of interfaces we want to keep even if orphaned.
+ std::vector<void *> RetainedTypes;
+
/// CompleteTypeCache - Cache of previously constructed complete RecordTypes.
llvm::DenseMap<void *, llvm::WeakVH> CompletedTypeCache;
@@ -131,6 +134,7 @@
const Type *Ty, QualType PointeeTy,
llvm::DIFile F);
+ llvm::Value *getCachedInterfaceTypeOrNull(const QualType Ty);
llvm::DIType getOrCreateStructPtrType(StringRef Name, llvm::DIType &Cache);
llvm::DISubprogram CreateCXXMemberFunction(const CXXMethodDecl *Method,