diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt index 2fe3c3941..068903dee 100644 --- a/libsolidity/CMakeLists.txt +++ b/libsolidity/CMakeLists.txt @@ -47,8 +47,6 @@ set(sources ast/ASTAnnotations.h ast/ASTEnums.h ast/ASTForward.h - ast/AsmJsonImporter.cpp - ast/AsmJsonImporter.h ast/ASTJsonConverter.cpp ast/ASTJsonConverter.h ast/ASTUtils.cpp diff --git a/libsolidity/ast/ASTJsonImporter.cpp b/libsolidity/ast/ASTJsonImporter.cpp index 48eed4d8a..d9d662571 100644 --- a/libsolidity/ast/ASTJsonImporter.cpp +++ b/libsolidity/ast/ASTJsonImporter.cpp @@ -22,18 +22,20 @@ */ #include -#include -#include + +#include +#include #include +#include + +#include +#include +#include +#include +#include + #include #include -#include -#include -#include -#include -#include -#include - using namespace std; @@ -569,7 +571,7 @@ ASTPointer ASTJsonImporter::createInlineAssembly(Json::Value con astAssert(m_evmVersion == evmVersion, "Imported tree evm version differs from configured evm version!"); yul::Dialect const& dialect = yul::EVMDialect::strictAssemblyForEVM(evmVersion.value()); - shared_ptr operations = make_shared(AsmJsonImporter(m_currentSourceName).createBlock(member(_node, "AST"))); + shared_ptr operations = make_shared(yul::AsmJsonImporter(m_currentSourceName).createBlock(member(_node, "AST"))); return createASTNode( _node, nullOrASTString(_node, "documentation"), diff --git a/libsolidity/ast/AsmJsonImporter.cpp b/libyul/AsmJsonImporter.cpp similarity index 98% rename from libsolidity/ast/AsmJsonImporter.cpp rename to libyul/AsmJsonImporter.cpp index ec5a50e1c..24434bc89 100644 --- a/libsolidity/ast/AsmJsonImporter.cpp +++ b/libyul/AsmJsonImporter.cpp @@ -22,23 +22,22 @@ */ -#include -#include -#include +#include #include #include + #include #include -#include #include #include +#include using namespace std; -using namespace solidity::yul; +using namespace solidity::langutil; -namespace solidity::frontend +namespace solidity::yul { using SourceLocation = langutil::SourceLocation; diff --git a/libsolidity/ast/AsmJsonImporter.h b/libyul/AsmJsonImporter.h similarity index 98% rename from libsolidity/ast/AsmJsonImporter.h rename to libyul/AsmJsonImporter.h index b4e8cfe7b..65f549dc5 100644 --- a/libsolidity/ast/AsmJsonImporter.h +++ b/libyul/AsmJsonImporter.h @@ -29,7 +29,7 @@ #include -namespace solidity::frontend +namespace solidity::yul { /** diff --git a/libyul/CMakeLists.txt b/libyul/CMakeLists.txt index a6d41bb07..187091278 100644 --- a/libyul/CMakeLists.txt +++ b/libyul/CMakeLists.txt @@ -6,6 +6,8 @@ add_library(yul AsmDataForward.h AsmJsonConverter.h AsmJsonConverter.cpp + AsmJsonImporter.h + AsmJsonImporter.cpp AsmParser.cpp AsmParser.h AsmPrinter.cpp