Add in a caching mechanism so that forward declarations are replaced
with full types if they exist.
rdar://10809898 and rdar://10209967 and rdar://10400981
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150858 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index 1116336..a071b06 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -56,6 +56,10 @@
/// CompleteTypeCache - Cache of previously constructed complete RecordTypes.
llvm::DenseMap<void *, llvm::WeakVH> CompletedTypeCache;
+ /// ReplaceMap - Cache of forward declared types to RAUW at the end of
+ /// compilation.
+ std::vector<std::pair<void *, llvm::WeakVH> >ReplaceMap;
+
bool BlockLiteralGenericSet;
llvm::DIType BlockLiteralGeneric;
@@ -160,7 +164,8 @@
public:
CGDebugInfo(CodeGenModule &CGM);
~CGDebugInfo();
- void finalize() { DBuilder.finalize(); }
+
+ void finalize(void);
/// setLocation - Update the current source location. If \arg loc is
/// invalid it is ignored.