diff options
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
| -rw-r--r-- | llvm/lib/MC/WasmObjectWriter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index 02d8bfbe1de..55e7c93c87e 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -1317,8 +1317,11 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm, // TODO: Translate debug sections to the output. } -MCObjectWriter * +std::unique_ptr<MCObjectWriter> llvm::createWasmObjectWriter(std::unique_ptr<MCWasmObjectTargetWriter> MOTW, raw_pwrite_stream &OS) { - return new WasmObjectWriter(std::move(MOTW), OS); + // FIXME: Can't use make_unique<WasmObjectWriter>(...) as WasmObjectWriter's + // destructor is private. Is that necessary? + return std::unique_ptr<MCObjectWriter>( + new WasmObjectWriter(std::move(MOTW), OS)); } |

