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

lld uses an arena allocator to one of allocations
like these can just use make<>.

Differential Revision: https://reviews.llvm.org/D43587

llvm-svn: 325706
This commit is contained in:
Sam Clegg
2018-02-21 18:37:44 +00:00
parent 9f93422651
commit 011dce2d14

View File

@@ -131,7 +131,6 @@ private:
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 @@ void Writer::createCtorFunction() {
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.