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