mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Properly assign source names for AST import.
This commit is contained in:
@@ -45,7 +45,7 @@ SourceLocation const AsmJsonImporter::createSourceLocation(Json::Value const& _n
|
||||
{
|
||||
yulAssert(member(_node, "src").isString(), "'src' must be a string");
|
||||
|
||||
return solidity::langutil::parseSourceLocation(_node["src"].asString(), m_sourceName);
|
||||
return solidity::langutil::parseSourceLocation(_node["src"].asString(), m_sourceNames);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -38,7 +38,9 @@ namespace solidity::yul
|
||||
class AsmJsonImporter
|
||||
{
|
||||
public:
|
||||
explicit AsmJsonImporter(std::string _sourceName) : m_sourceName(std::move(_sourceName)) {}
|
||||
explicit AsmJsonImporter(std::vector<std::shared_ptr<std::string const>> const& _sourceNames):
|
||||
m_sourceNames(_sourceNames)
|
||||
{}
|
||||
yul::Block createBlock(Json::Value const& _node);
|
||||
|
||||
private:
|
||||
@@ -70,8 +72,7 @@ private:
|
||||
yul::Break createBreak(Json::Value const& _node);
|
||||
yul::Continue createContinue(Json::Value const& _node);
|
||||
|
||||
std::string m_sourceName;
|
||||
|
||||
std::vector<std::shared_ptr<std::string const>> const& m_sourceNames;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user