diff options
Diffstat (limited to 'libyul/optimiser/FullInliner.cpp')
-rw-r--r-- | libyul/optimiser/FullInliner.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libyul/optimiser/FullInliner.cpp b/libyul/optimiser/FullInliner.cpp index dd969faf..ca6162ec 100644 --- a/libyul/optimiser/FullInliner.cpp +++ b/libyul/optimiser/FullInliner.cpp @@ -181,9 +181,9 @@ vector<Statement> InlineModifier::performInline(Statement& _statement, FunctionC variableReplacements[_existingVariable.name] = newName; VariableDeclaration varDecl{_funCall.location, {{_funCall.location, newName, _existingVariable.type}}, {}}; if (_value) - varDecl.value = make_shared<Expression>(std::move(*_value)); + varDecl.value = make_unique<Expression>(std::move(*_value)); else - varDecl.value = make_shared<Expression>(zero); + varDecl.value = make_unique<Expression>(zero); newStatements.emplace_back(std::move(varDecl)); }; @@ -202,7 +202,7 @@ vector<Statement> InlineModifier::performInline(Statement& _statement, FunctionC newStatements.emplace_back(Assignment{ _assignment.location, {_assignment.variableNames[i]}, - make_shared<Expression>(Identifier{ + make_unique<Expression>(Identifier{ _assignment.location, variableReplacements.at(function->returnVariables[i].name) }) @@ -214,7 +214,7 @@ vector<Statement> InlineModifier::performInline(Statement& _statement, FunctionC newStatements.emplace_back(VariableDeclaration{ _varDecl.location, {std::move(_varDecl.variables[i])}, - make_shared<Expression>(Identifier{ + make_unique<Expression>(Identifier{ _varDecl.location, variableReplacements.at(function->returnVariables[i].name) }) @@ -232,10 +232,10 @@ Statement BodyCopier::operator()(VariableDeclaration const& _varDecl) return ASTCopier::operator()(_varDecl); } -Statement BodyCopier::operator()(FunctionDefinition const& _funDef) +Statement BodyCopier::operator()(FunctionDefinition const&) { assertThrow(false, OptimizerException, "Function hoisting has to be done before function inlining."); - return _funDef; + return {}; } YulString BodyCopier::translateIdentifier(YulString _name) |