diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-11-18 00:34:10 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-11-18 00:34:10 +0000 |
commit | 6196aa06c9d5a6c6446f4dc1d6154852fdd42bca (patch) | |
tree | 4e805c30e4ea00ef1bcd06aca19c868de3c6691d /llvm/lib | |
parent | a21af73c41443b76ad9f13ab56f13d269f60bfc4 (diff) | |
download | bcm5719-llvm-6196aa06c9d5a6c6446f4dc1d6154852fdd42bca.tar.gz bcm5719-llvm-6196aa06c9d5a6c6446f4dc1d6154852fdd42bca.zip |
Generalize ownership/passing semantics to allow dsymutil to own abbreviations via unique_ptr
While still allowing CodeGen/AsmPrinter in llvm to own them using a bump
ptr allocator. (might be nice to replace the pointers there with
something that at least automatically calls their dtors, if that's
necessary/useful, rather than having it done explicitly (I think a typed
BumpPtrAllocator already does this, or maybe a unique_ptr with a custom
deleter, etc))
llvm-svn: 253409
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp index 9ede04c4c1b..504c5d283cb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp @@ -281,17 +281,10 @@ void AsmPrinter::emitDwarfDIE(const DIE &Die) const { } } -void -AsmPrinter::emitDwarfAbbrevs(const std::vector<DIEAbbrev *>& Abbrevs) const { - // For each abbreviation. - for (const DIEAbbrev *Abbrev : Abbrevs) { - // Emit the abbreviations code (base 1 index.) - EmitULEB128(Abbrev->getNumber(), "Abbreviation Code"); - - // Emit the abbreviations data. - Abbrev->Emit(this); - } +void AsmPrinter::emitDwarfAbbrev(const DIEAbbrev &Abbrev) const { + // Emit the abbreviations code (base 1 index.) + EmitULEB128(Abbrev.getNumber(), "Abbreviation Code"); - // Mark end of abbreviations. - EmitULEB128(0, "EOM(3)"); + // Emit the abbreviations data. + Abbrev.Emit(this); } |