From 9ff69c8f4de60cfe4d832247a720b936183c08e5 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Fri, 24 Apr 2015 19:11:51 +0000 Subject: [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 --- llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp index 97a3234c28f..eb9e4c10daf 100644 --- a/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp @@ -47,11 +47,11 @@ void llvm::linkErlangGCPrinter() {} void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info, AsmPrinter &AP) { - MCStreamer &OS = AP.OutStreamer; + MCStreamer &OS = *AP.OutStreamer; unsigned IntPtrSize = AP.TM.getDataLayout()->getPointerSize(); // Put this in a custom .note section. - AP.OutStreamer.SwitchSection( + OS.SwitchSection( AP.getObjFileLowering().getContext().getELFSection(".note.gc", ELF::SHT_PROGBITS, 0)); -- cgit v1.2.3