mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace boost::variant by std::variant in libyul
This commit is contained in:
@@ -48,16 +48,16 @@ void LoadResolver::visit(Expression& _e)
|
||||
if (!dynamic_cast<EVMDialect const*>(&m_dialect))
|
||||
return;
|
||||
|
||||
if (_e.type() == typeid(FunctionCall))
|
||||
if (holds_alternative<FunctionCall>(_e))
|
||||
{
|
||||
FunctionCall const& funCall = boost::get<FunctionCall>(_e);
|
||||
FunctionCall const& funCall = std::get<FunctionCall>(_e);
|
||||
if (auto const* builtin = dynamic_cast<EVMDialect const&>(m_dialect).builtin(funCall.functionName.name))
|
||||
if (builtin->instruction)
|
||||
tryResolve(_e, *builtin->instruction, funCall.arguments);
|
||||
}
|
||||
else if (_e.type() == typeid(FunctionalInstruction))
|
||||
else if (holds_alternative<FunctionalInstruction>(_e))
|
||||
{
|
||||
FunctionalInstruction const& instruction = boost::get<FunctionalInstruction>(_e);
|
||||
FunctionalInstruction const& instruction = std::get<FunctionalInstruction>(_e);
|
||||
tryResolve(_e, instruction.instruction, instruction.arguments);
|
||||
}
|
||||
}
|
||||
@@ -68,10 +68,10 @@ void LoadResolver::tryResolve(
|
||||
vector<Expression> const& _arguments
|
||||
)
|
||||
{
|
||||
if (_arguments.empty() || _arguments.at(0).type() != typeid(Identifier))
|
||||
if (_arguments.empty() || !holds_alternative<Identifier>(_arguments.at(0)))
|
||||
return;
|
||||
|
||||
YulString key = boost::get<Identifier>(_arguments.at(0)).name;
|
||||
YulString key = std::get<Identifier>(_arguments.at(0)).name;
|
||||
if (
|
||||
_instruction == dev::eth::Instruction::SLOAD &&
|
||||
m_storage.values.count(key)
|
||||
|
||||
Reference in New Issue
Block a user