diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-26 16:26:41 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-26 16:26:41 +0000 |
commit | f3de2ab46c7ba29a4888d7966d2e5d26e8a4ec47 (patch) | |
tree | e342e39828d9309c9e57aef65c37ce7b7b063734 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | |
parent | 7c3722724bb1dc7fc5cec4d2644c478b3c3ae608 (diff) | |
download | bcm5719-llvm-f3de2ab46c7ba29a4888d7966d2e5d26e8a4ec47.tar.gz bcm5719-llvm-f3de2ab46c7ba29a4888d7966d2e5d26e8a4ec47.zip |
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.
llvm-svn: 207321
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 326243278ec..f3cd80027d0 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -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)); } |