mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 16:06:39 +08:00
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user