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:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
#include <boost/range/algorithm_ext/erase.hpp>
|
||||
#include <variant>
|
||||
|
||||
using namespace std;
|
||||
using namespace dev;
|
||||
@@ -364,19 +365,19 @@ std::optional<pair<YulString, YulString>> DataFlowAnalyzer::isSimpleStore(
|
||||
_store == dev::eth::Instruction::SSTORE,
|
||||
""
|
||||
);
|
||||
if (_statement.expression.type() == typeid(FunctionCall))
|
||||
if (holds_alternative<FunctionCall>(_statement.expression))
|
||||
{
|
||||
FunctionCall const& funCall = boost::get<FunctionCall>(_statement.expression);
|
||||
FunctionCall const& funCall = std::get<FunctionCall>(_statement.expression);
|
||||
if (EVMDialect const* dialect = dynamic_cast<EVMDialect const*>(&m_dialect))
|
||||
if (auto const* builtin = dialect->builtin(funCall.functionName.name))
|
||||
if (builtin->instruction == _store)
|
||||
if (
|
||||
funCall.arguments.at(0).type() == typeid(Identifier) &&
|
||||
funCall.arguments.at(1).type() == typeid(Identifier)
|
||||
holds_alternative<Identifier>(funCall.arguments.at(0)) &&
|
||||
holds_alternative<Identifier>(funCall.arguments.at(1))
|
||||
)
|
||||
{
|
||||
YulString key = boost::get<Identifier>(funCall.arguments.at(0)).name;
|
||||
YulString value = boost::get<Identifier>(funCall.arguments.at(1)).name;
|
||||
YulString key = std::get<Identifier>(funCall.arguments.at(0)).name;
|
||||
YulString value = std::get<Identifier>(funCall.arguments.at(1)).name;
|
||||
return make_pair(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user