aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-11-18 03:20:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-11-18 03:20:36 +0000
commitfde9b8bfc220c589f9103b3919d107cd3e944cc6 (patch)
tree4ec04633a3d811033e26ea392b1f35e0cd868b55 /lib
parent3962c3afbc3c4c8601084e61395c6f286f4db3df (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/Object/IRObjectFile.cpp8
1 files changed, 4 insertions, 4 deletions
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<RecordStreamer> Streamer(new RecordStreamer(MCCtx));
- T->createNullTargetStreamer(*Streamer);
+ RecordStreamer Streamer(MCCtx);
+ T->createNullTargetStreamer(Streamer);
std::unique_ptr<MemoryBuffer> Buffer(MemoryBuffer::getMemBuffer(InlineAsm));
SourceMgr SrcMgr;
SrcMgr.AddNewSourceBuffer(std::move(Buffer), SMLoc());
std::unique_ptr<MCAsmParser> Parser(
- createMCAsmParser(SrcMgr, MCCtx, *Streamer, *MAI));
+ createMCAsmParser(SrcMgr, MCCtx, Streamer, *MAI));
MCTargetOptions MCOptions;
std::unique_ptr<MCTargetAsmParser> 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;