diff options
author | chriseth <chris@ethereum.org> | 2018-11-22 07:31:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-22 07:31:01 +0800 |
commit | b5acc630089ba0e4c41cfb8548c82f157f9be6fc (patch) | |
tree | 9f95cd156ce58213c7412597568d096635c7d868 /libyul/backends | |
parent | 7d8c1fc53b1eb318bb0eb0896dfd6ab77a11eb6e (diff) | |
parent | d67322a1861d60a88151f7c25d6c3478a9a39acf (diff) | |
download | dexon-solidity-b5acc630089ba0e4c41cfb8548c82f157f9be6fc.tar dexon-solidity-b5acc630089ba0e4c41cfb8548c82f157f9be6fc.tar.gz dexon-solidity-b5acc630089ba0e4c41cfb8548c82f157f9be6fc.tar.bz2 dexon-solidity-b5acc630089ba0e4c41cfb8548c82f157f9be6fc.tar.lz dexon-solidity-b5acc630089ba0e4c41cfb8548c82f157f9be6fc.tar.xz dexon-solidity-b5acc630089ba0e4c41cfb8548c82f157f9be6fc.tar.zst dexon-solidity-b5acc630089ba0e4c41cfb8548c82f157f9be6fc.zip |
Merge pull request #5427 from ethereum/liblangutil
Factor out langutil, a new static library that is shared between libyul/libsolidity
Diffstat (limited to 'libyul/backends')
-rw-r--r-- | libyul/backends/evm/AbstractAssembly.h | 8 | ||||
-rw-r--r-- | libyul/backends/evm/EVMAssembly.cpp | 3 | ||||
-rw-r--r-- | libyul/backends/evm/EVMAssembly.h | 7 | ||||
-rw-r--r-- | libyul/backends/evm/EVMCodeTransform.cpp | 2 |
4 files changed, 15 insertions, 5 deletions
diff --git a/libyul/backends/evm/AbstractAssembly.h b/libyul/backends/evm/AbstractAssembly.h index d75058f7..5a1140cb 100644 --- a/libyul/backends/evm/AbstractAssembly.h +++ b/libyul/backends/evm/AbstractAssembly.h @@ -26,9 +26,13 @@ #include <functional> -namespace dev +namespace langutil { struct SourceLocation; +} + +namespace dev +{ namespace solidity { enum class Instruction: uint8_t; @@ -52,7 +56,7 @@ public: virtual ~AbstractAssembly() {} /// Set a new source location valid starting from the next instruction. - virtual void setSourceLocation(SourceLocation const& _location) = 0; + virtual void setSourceLocation(langutil::SourceLocation const& _location) = 0; /// Retrieve the current height of the stack. This does not have to be zero /// at the beginning. virtual int stackHeight() const = 0; diff --git a/libyul/backends/evm/EVMAssembly.cpp b/libyul/backends/evm/EVMAssembly.cpp index b37a3231..791b6226 100644 --- a/libyul/backends/evm/EVMAssembly.cpp +++ b/libyul/backends/evm/EVMAssembly.cpp @@ -22,10 +22,11 @@ #include <libevmasm/Instruction.h> -#include <libsolidity/interface/Exceptions.h> +#include <liblangutil/Exceptions.h> using namespace std; using namespace dev; +using namespace langutil; using namespace dev::yul; namespace diff --git a/libyul/backends/evm/EVMAssembly.h b/libyul/backends/evm/EVMAssembly.h index 8f92b6e7..c9190634 100644 --- a/libyul/backends/evm/EVMAssembly.h +++ b/libyul/backends/evm/EVMAssembly.h @@ -26,6 +26,11 @@ #include <map> +namespace langutil +{ +struct SourceLocation; +} + namespace dev { namespace yul @@ -38,7 +43,7 @@ public: virtual ~EVMAssembly() {} /// Set a new source location valid starting from the next instruction. - void setSourceLocation(SourceLocation const& _location) override; + void setSourceLocation(langutil::SourceLocation const& _location) override; /// Retrieve the current height of the stack. This does not have to be zero /// at the beginning. int stackHeight() const override { return m_stackHeight; } diff --git a/libyul/backends/evm/EVMCodeTransform.cpp b/libyul/backends/evm/EVMCodeTransform.cpp index 650a8c0a..23e09756 100644 --- a/libyul/backends/evm/EVMCodeTransform.cpp +++ b/libyul/backends/evm/EVMCodeTransform.cpp @@ -23,7 +23,7 @@ #include <libsolidity/inlineasm/AsmAnalysisInfo.h> #include <libsolidity/inlineasm/AsmData.h> -#include <libsolidity/interface/Exceptions.h> +#include <liblangutil/Exceptions.h> #include <boost/range/adaptor/reversed.hpp> |