mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
DwarfDebug: Minor refactoring around type unit construction
Sinking addition of the declaration attribute down to where the signature is added. So that if the signature is not added neither is the declaration attribute (this will come in handy when aborting type unit construction to instead emit the type into the CU directly in some cases) Pull out type unit identifier hashing just to simplify the function a little, it'll be getting longer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207321 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -360,6 +360,12 @@ void DwarfUnit::addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE &Entry) {
|
||||
}
|
||||
|
||||
void DwarfUnit::addDIETypeSignature(DIE &Die, const DwarfTypeUnit &Type) {
|
||||
// Flag the type unit reference as a declaration so that if it contains
|
||||
// members (implicit special members, static data member definitions, member
|
||||
// declarations for definitions in this CU, etc) consumers don't get confused
|
||||
// and think this is a full definition.
|
||||
addFlag(Die, dwarf::DW_AT_declaration);
|
||||
|
||||
Die.addValue(dwarf::DW_AT_signature, dwarf::DW_FORM_ref_sig8,
|
||||
new (DIEValueAllocator) DIETypeSignature(Type));
|
||||
}
|
||||
|
Reference in New Issue
Block a user