diff options
author | Lang Hames <lhames@gmail.com> | 2015-04-24 19:11:51 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-04-24 19:11:51 +0000 |
commit | 9ff69c8f4de60cfe4d832247a720b936183c08e5 (patch) | |
tree | 187affe30650a751b2e08d5a95b16963d819ef13 /llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp | |
parent | b597408da49548c0a971d548132eb80b01ce58b0 (diff) | |
download | bcm5719-llvm-9ff69c8f4de60cfe4d832247a720b936183c08e5.tar.gz bcm5719-llvm-9ff69c8f4de60cfe4d832247a720b936183c08e5.zip |
[AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr.
AsmPrinter owns the OutStreamer, so an owning pointer makes sense here. Using a
reference for this is crufty.
llvm-svn: 235752
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp index 165ef16dfbc..ee224f8b4d9 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp @@ -38,7 +38,7 @@ void DwarfStringPool::emit(AsmPrinter &Asm, const MCSection *StrSection, return; // Start the dwarf str section. - Asm.OutStreamer.SwitchSection(StrSection); + Asm.OutStreamer->SwitchSection(StrSection); // Get all of the string pool entries and put them in an array by their ID so // we can sort them. @@ -50,20 +50,20 @@ void DwarfStringPool::emit(AsmPrinter &Asm, const MCSection *StrSection, for (const auto &Entry : Entries) { // Emit a label for reference from debug information entries. - Asm.OutStreamer.EmitLabel(Entry->getValue().first); + Asm.OutStreamer->EmitLabel(Entry->getValue().first); // Emit the string itself with a terminating null byte. - Asm.OutStreamer.EmitBytes( + Asm.OutStreamer->EmitBytes( StringRef(Entry->getKeyData(), Entry->getKeyLength() + 1)); } // If we've got an offset section go ahead and emit that now as well. if (OffsetSection) { - Asm.OutStreamer.SwitchSection(OffsetSection); + Asm.OutStreamer->SwitchSection(OffsetSection); unsigned offset = 0; unsigned size = 4; // FIXME: DWARF64 is 8. for (const auto &Entry : Entries) { - Asm.OutStreamer.EmitIntValue(offset, size); + Asm.OutStreamer->EmitIntValue(offset, size); offset += Entry->getKeyLength() + 1; } } |