From fde9b8bfc220c589f9103b3919d107cd3e944cc6 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 18 Nov 2016 03:20:36 +0000 Subject: Object: Simplify; remove unnecessary use of unique_ptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287305 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/IRObjectFile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Object/IRObjectFile.cpp') diff --git a/lib/Object/IRObjectFile.cpp b/lib/Object/IRObjectFile.cpp index 3aa9b755705..a2d2e196519 100644 --- a/lib/Object/IRObjectFile.cpp +++ b/lib/Object/IRObjectFile.cpp @@ -76,14 +76,14 @@ void IRObjectFile::CollectAsmUndefinedRefs( MCObjectFileInfo MOFI; MCContext MCCtx(MAI.get(), MRI.get(), &MOFI); MOFI.InitMCObjectFileInfo(TT, /*PIC*/ false, CodeModel::Default, MCCtx); - std::unique_ptr Streamer(new RecordStreamer(MCCtx)); - T->createNullTargetStreamer(*Streamer); + RecordStreamer Streamer(MCCtx); + T->createNullTargetStreamer(Streamer); std::unique_ptr Buffer(MemoryBuffer::getMemBuffer(InlineAsm)); SourceMgr SrcMgr; SrcMgr.AddNewSourceBuffer(std::move(Buffer), SMLoc()); std::unique_ptr Parser( - createMCAsmParser(SrcMgr, MCCtx, *Streamer, *MAI)); + createMCAsmParser(SrcMgr, MCCtx, Streamer, *MAI)); MCTargetOptions MCOptions; std::unique_ptr TAP( @@ -95,7 +95,7 @@ void IRObjectFile::CollectAsmUndefinedRefs( if (Parser->Run(false)) return; - for (auto &KV : *Streamer) { + for (auto &KV : Streamer) { StringRef Key = KV.first(); RecordStreamer::State Value = KV.second; uint32_t Res = BasicSymbolRef::SF_None; -- cgit v1.2.3