From 8cc99f1887df7035e677940bba48063858360f2d Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Tue, 10 Oct 2017 07:19:18 +0000 Subject: [PATCH] [RISCV] Fix build after r315254 createELFObjectWriter now takes a std::unique_ptr rather than a MCELFObjectTargetWriter*. llvm-svn: 315275 --- llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp index 95d4242e4042..6319db84c6f4 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp @@ -63,6 +63,7 @@ unsigned RISCVELFObjectWriter::getRelocType(MCContext &Ctx, MCObjectWriter *llvm::createRISCVELFObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI, bool Is64Bit) { - MCELFObjectTargetWriter *MOTW = new RISCVELFObjectWriter(OSABI, Is64Bit); - return createELFObjectWriter(MOTW, OS, /*IsLittleEndian*/ true); + return createELFObjectWriter( + llvm::make_unique(OSABI, Is64Bit), OS, + /*IsLittleEndian=*/false); }