[PATCH] D43587: [WebAssembly] Use make<> rather then make_unique<>. NFC.

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 10:41:35 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD325706: [WebAssembly] Use make<> rather then make_unique<>. NFC. (authored by sbc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D43587?vs=135288&id=135294#toc

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D43587

Files:
  wasm/Writer.cpp


Index: wasm/Writer.cpp
===================================================================
--- wasm/Writer.cpp
+++ wasm/Writer.cpp
@@ -131,7 +131,6 @@
   std::vector<OutputSection *> OutputSections;
 
   std::unique_ptr<FileOutputBuffer> Buffer;
-  std::unique_ptr<SyntheticFunction> CtorFunction;
   std::string CtorFunctionBody;
 
   std::vector<OutputSegment *> Segments;
@@ -852,10 +851,10 @@
   ArrayRef<uint8_t> BodyArray(
       reinterpret_cast<const uint8_t *>(CtorFunctionBody.data()),
       CtorFunctionBody.size());
-  CtorFunction = llvm::make_unique<SyntheticFunction>(
-      Signature, BodyArray, WasmSym::CallCtors->getName());
-  CtorFunction->setOutputIndex(FunctionIndex);
-  InputFunctions.emplace_back(CtorFunction.get());
+  SyntheticFunction *F = make<SyntheticFunction>(Signature, BodyArray,
+                                                 WasmSym::CallCtors->getName());
+  F->setOutputIndex(FunctionIndex);
+  InputFunctions.emplace_back(F);
 }
 
 // Populate InitFunctions vector with init functions from all input objects.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43587.135294.patch
Type: text/x-patch
Size: 1055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180221/ca5ae746/attachment.bin>


More information about the llvm-commits mailing list