Add preliminary support for hashing DIEs and breaking them into
type units.
Initially this support is used in the computation of an ODR checker
for C++. For now we're attaching it to the DIE, but in the future
it will be attached to the type unit.
This also starts breaking out types into the separation for type
units, but without actually splitting the DIEs.
In preparation for hashing the DIEs this adds a DIEString type
that contains a StringRef with the string contained at the label.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187213 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index deb2e60..e14f9b1 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -428,6 +428,9 @@
ImportedEntityMap;
ImportedEntityMap ScopesWithImportedEntities;
+ // Holder for types that are going to be extracted out into a type unit.
+ std::vector<DIE *> TypeUnits;
+
// DWARF5 Experimental Options
bool HasDwarfAccelTables;
bool HasSplitDwarf;
@@ -651,6 +654,10 @@
/// \brief Process end of an instruction.
void endInstruction(const MachineInstr *MI);
+ /// \brief Add a DIE to the set of types that we're going to pull into
+ /// type units.
+ void addTypeUnitType(DIE *Die) { TypeUnits.push_back(Die); }
+
/// \brief Look up the source id with the given directory and source file
/// names. If none currently exists, create a new id and insert it in the
/// SourceIds map.