DebugInfo: Introduce new DIValue, DIETypeSignature to encode references to type units via their signatures

This simplifies type unit and type unit reference creation as well as
setting the stage for inter-type hashing across type unit boundaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197539 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2013-12-17 23:32:35 +00:00
parent f07d462beb
commit 2cb3295a53
6 changed files with 61 additions and 36 deletions

View File

@ -322,6 +322,11 @@ void DwarfUnit::addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIE *Entry) {
addDIEEntry(Die, Attribute, createDIEEntry(Entry));
}
void DwarfUnit::addDIETypeSignature(DIE *Die, const DwarfTypeUnit &Type) {
Die->addValue(dwarf::DW_AT_signature, dwarf::DW_FORM_ref_sig8,
new (DIEValueAllocator) DIETypeSignature(Type));
}
void DwarfUnit::addDIEEntry(DIE *Die, dwarf::Attribute Attribute,
DIEEntry *Entry) {
const DIE *DieCU = Die->getUnitOrNull();