DIBuilder: Now that DICompileUnit is distinct, stop using temporary nodes

for the arrays.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241308 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl
2015-07-02 22:32:52 +00:00
parent 516286ff69
commit c3d9cd3f73
3 changed files with 44 additions and 47 deletions

View File

@@ -36,14 +36,9 @@ namespace llvm {
Module &M;
LLVMContext &VMContext;
TempMDTuple TempEnumTypes;
TempMDTuple TempRetainTypes;
TempMDTuple TempSubprograms;
TempMDTuple TempGVs;
TempMDTuple TempImportedModules;
Function *DeclareFn; // llvm.dbg.declare
Function *ValueFn; // llvm.dbg.value
DICompileUnit *CUNode; ///< The one compile unit created by this DIBuiler.
Function *DeclareFn; ///< llvm.dbg.declare
Function *ValueFn; ///< llvm.dbg.value
SmallVector<Metadata *, 4> AllEnumTypes;
/// Track the RetainTypes, since they can be updated later on.

View File

@@ -1085,12 +1085,21 @@ public:
/// deleted on a uniquing collision. In practice, uniquing collisions on \a
/// DICompileUnit should be fairly rare.
/// @{
void replaceEnumTypes(DISubprogramArray N) {
replaceOperandWith(4, N.get());
}
void replaceRetainedTypes(DISubprogramArray N) {
replaceOperandWith(5, N.get());
}
void replaceSubprograms(DISubprogramArray N) {
replaceOperandWith(6, N.get());
}
void replaceGlobalVariables(DIGlobalVariableArray N) {
replaceOperandWith(7, N.get());
}
void replaceImportedEntities(DIGlobalVariableArray N) {
replaceOperandWith(8, N.get());
}
/// @}
static bool classof(const Metadata *MD) {