summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/IRObjectFile.cpp
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
commit63e10c9c96af3d1b352ade216aa3bb6b5ff1c3e4 (patch)
tree4d935fb5f6ba2b2b05d28e1c7985eabf3ecdd4c4 /llvm/lib/Object/IRObjectFile.cpp
parent637488dbf8de0c65afb79982241e3a07daab2d30 (diff)
downloadbcm5719-llvm-63e10c9c96af3d1b352ade216aa3bb6b5ff1c3e4.tar.gz
bcm5719-llvm-63e10c9c96af3d1b352ade216aa3bb6b5ff1c3e4.zip
Object: Simplify; remove unnecessary use of unique_ptr.
llvm-svn: 287305
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
-rw-r--r--llvm/lib/Object/IRObjectFile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp
index 3aa9b755705..a2d2e196519 100644
--- a/llvm/lib/Object/IRObjectFile.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud