aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-11-14 21:59:30 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-11-22 02:58:12 +0800
commit87821c53c3a73d3e35a0e50a7c159d9aa5d6b253 (patch)
treed0335db1bfe77f91168e14599e943105b7c9a2c3 /libsolidity/interface
parentd47707abaddfd6820d8ff1f9ec5ec0d2a61ee622 (diff)
downloaddexon-solidity-87821c53c3a73d3e35a0e50a7c159d9aa5d6b253.tar
dexon-solidity-87821c53c3a73d3e35a0e50a7c159d9aa5d6b253.tar.gz
dexon-solidity-87821c53c3a73d3e35a0e50a7c159d9aa5d6b253.tar.bz2
dexon-solidity-87821c53c3a73d3e35a0e50a7c159d9aa5d6b253.tar.lz
dexon-solidity-87821c53c3a73d3e35a0e50a7c159d9aa5d6b253.tar.xz
dexon-solidity-87821c53c3a73d3e35a0e50a7c159d9aa5d6b253.tar.zst
dexon-solidity-87821c53c3a73d3e35a0e50a7c159d9aa5d6b253.zip
Isolating files shared between Yul- and Solidity language frontend.
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/AssemblyStack.cpp2
-rw-r--r--libsolidity/interface/AssemblyStack.h4
-rw-r--r--libsolidity/interface/CompilerStack.cpp2
-rw-r--r--libsolidity/interface/CompilerStack.h6
-rw-r--r--libsolidity/interface/EVMVersion.h94
-rw-r--r--libsolidity/interface/ErrorReporter.cpp226
-rw-r--r--libsolidity/interface/ErrorReporter.h126
-rw-r--r--libsolidity/interface/Exceptions.cpp66
-rw-r--r--libsolidity/interface/Exceptions.h132
-rw-r--r--libsolidity/interface/GasEstimator.h2
-rw-r--r--libsolidity/interface/SourceReferenceFormatter.cpp4
-rw-r--r--libsolidity/interface/SourceReferenceFormatter.h2
-rw-r--r--libsolidity/interface/Version.cpp2
13 files changed, 12 insertions, 656 deletions
diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp
index 26496de7..26879e8b 100644
--- a/libsolidity/interface/AssemblyStack.cpp
+++ b/libsolidity/interface/AssemblyStack.cpp
@@ -22,7 +22,7 @@
#include <libsolidity/interface/AssemblyStack.h>
-#include <libsolidity/parsing/Scanner.h>
+#include <liblangutil/Scanner.h>
#include <libsolidity/inlineasm/AsmPrinter.h>
#include <libsolidity/inlineasm/AsmParser.h>
#include <libsolidity/inlineasm/AsmAnalysis.h>
diff --git a/libsolidity/interface/AssemblyStack.h b/libsolidity/interface/AssemblyStack.h
index 8132ce63..aad65ffc 100644
--- a/libsolidity/interface/AssemblyStack.h
+++ b/libsolidity/interface/AssemblyStack.h
@@ -21,8 +21,8 @@
#pragma once
-#include <libsolidity/interface/ErrorReporter.h>
-#include <libsolidity/interface/EVMVersion.h>
+#include <liblangutil/ErrorReporter.h>
+#include <liblangutil/EVMVersion.h>
#include <libevmasm/LinkerObject.h>
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp
index d6a63f1d..08a248dd 100644
--- a/libsolidity/interface/CompilerStack.cpp
+++ b/libsolidity/interface/CompilerStack.cpp
@@ -27,7 +27,7 @@
#include <libsolidity/interface/Version.h>
#include <libsolidity/analysis/SemVerHandler.h>
#include <libsolidity/ast/AST.h>
-#include <libsolidity/parsing/Scanner.h>
+#include <liblangutil/Scanner.h>
#include <libsolidity/parsing/Parser.h>
#include <libsolidity/analysis/ControlFlowAnalyzer.h>
#include <libsolidity/analysis/ControlFlowGraph.h>
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h
index 9a15fbf0..a7e312ad 100644
--- a/libsolidity/interface/CompilerStack.h
+++ b/libsolidity/interface/CompilerStack.h
@@ -23,11 +23,11 @@
#pragma once
-#include <libsolidity/interface/ErrorReporter.h>
+#include <liblangutil/ErrorReporter.h>
#include <libsolidity/interface/ReadFile.h>
-#include <libsolidity/interface/EVMVersion.h>
+#include <liblangutil/EVMVersion.h>
-#include <libevmasm/SourceLocation.h>
+#include <liblangutil/SourceLocation.h>
#include <libevmasm/LinkerObject.h>
#include <libdevcore/Common.h>
diff --git a/libsolidity/interface/EVMVersion.h b/libsolidity/interface/EVMVersion.h
deleted file mode 100644
index 657727ac..00000000
--- a/libsolidity/interface/EVMVersion.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- This file is part of solidity.
-
- solidity is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- solidity is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with solidity. If not, see <http://www.gnu.org/licenses/>.
-*/
-/**
- * EVM versioning.
- */
-
-#pragma once
-
-#include <string>
-
-#include <boost/optional.hpp>
-#include <boost/operators.hpp>
-
-namespace dev
-{
-namespace solidity
-{
-
-/**
- * A version specifier of the EVM we want to compile to.
- * Defaults to the latest version.
- */
-class EVMVersion:
- boost::less_than_comparable<EVMVersion>,
- boost::equality_comparable<EVMVersion>
-{
-public:
- EVMVersion() {}
-
- static EVMVersion homestead() { return {Version::Homestead}; }
- static EVMVersion tangerineWhistle() { return {Version::TangerineWhistle}; }
- static EVMVersion spuriousDragon() { return {Version::SpuriousDragon}; }
- static EVMVersion byzantium() { return {Version::Byzantium}; }
- static EVMVersion constantinople() { return {Version::Constantinople}; }
-
- static boost::optional<EVMVersion> fromString(std::string const& _version)
- {
- for (auto const& v: {homestead(), tangerineWhistle(), spuriousDragon(), byzantium(), constantinople()})
- if (_version == v.name())
- return v;
- return {};
- }
-
- bool operator==(EVMVersion const& _other) const { return m_version == _other.m_version; }
- bool operator<(EVMVersion const& _other) const { return m_version < _other.m_version; }
-
- std::string name() const
- {
- switch (m_version)
- {
- case Version::Homestead: return "homestead";
- case Version::TangerineWhistle: return "tangerineWhistle";
- case Version::SpuriousDragon: return "spuriousDragon";
- case Version::Byzantium: return "byzantium";
- case Version::Constantinople: return "constantinople";
- }
- return "INVALID";
- }
-
- /// Has the RETURNDATACOPY and RETURNDATASIZE opcodes.
- bool supportsReturndata() const { return *this >= byzantium(); }
- bool hasStaticCall() const { return *this >= byzantium(); }
- bool hasBitwiseShifting() const { return *this >= constantinople(); }
- bool hasCreate2() const { return *this >= constantinople(); }
-
- /// Whether we have to retain the costs for the call opcode itself (false),
- /// or whether we can just forward easily all remaining gas (true).
- bool canOverchargeGasForCall() const { return *this >= tangerineWhistle(); }
-
-private:
- enum class Version { Homestead, TangerineWhistle, SpuriousDragon, Byzantium, Constantinople };
-
- EVMVersion(Version _version): m_version(_version) {}
-
- Version m_version = Version::Byzantium;
-};
-
-
-}
-}
diff --git a/libsolidity/interface/ErrorReporter.cpp b/libsolidity/interface/ErrorReporter.cpp
deleted file mode 100644
index 368e25e0..00000000
--- a/libsolidity/interface/ErrorReporter.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- This file is part of solidity.
-
- solidity is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- solidity is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with solidity. If not, see <http://www.gnu.org/licenses/>.
-*/
-/**
- * @author Rhett <roadriverrail@gmail.com>
- * @date 2017
- * Error helper class.
- */
-
-#include <libsolidity/interface/ErrorReporter.h>
-#include <libsolidity/ast/AST.h>
-#include <memory>
-
-using namespace std;
-using namespace dev;
-using namespace dev::solidity;
-
-ErrorReporter& ErrorReporter::operator=(ErrorReporter const& _errorReporter)
-{
- if (&_errorReporter == this)
- return *this;
- m_errorList = _errorReporter.m_errorList;
- return *this;
-}
-
-
-void ErrorReporter::warning(string const& _description)
-{
- error(Error::Type::Warning, SourceLocation(), _description);
-}
-
-void ErrorReporter::warning(
- SourceLocation const& _location,
- string const& _description
-)
-{
- error(Error::Type::Warning, _location, _description);
-}
-
-void ErrorReporter::warning(
- SourceLocation const& _location,
- string const& _description,
- SecondarySourceLocation const& _secondaryLocation
-)
-{
- error(Error::Type::Warning, _location, _secondaryLocation, _description);
-}
-
-void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, string const& _description)
-{
- if (checkForExcessiveErrors(_type))
- return;
-
- auto err = make_shared<Error>(_type);
- *err <<
- errinfo_sourceLocation(_location) <<
- errinfo_comment(_description);
-
- m_errorList.push_back(err);
-}
-
-void ErrorReporter::error(Error::Type _type, SourceLocation const& _location, SecondarySourceLocation const& _secondaryLocation, string const& _description)
-{
- if (checkForExcessiveErrors(_type))
- return;
-
- auto err = make_shared<Error>(_type);
- *err <<
- errinfo_sourceLocation(_location) <<
- errinfo_secondarySourceLocation(_secondaryLocation) <<
- errinfo_comment(_description);
-
- m_errorList.push_back(err);
-}
-
-bool ErrorReporter::checkForExcessiveErrors(Error::Type _type)
-{
- if (_type == Error::Type::Warning)
- {
- m_warningCount++;
-
- if (m_warningCount == c_maxWarningsAllowed)
- {
- auto err = make_shared<Error>(Error::Type::Warning);
- *err << errinfo_comment("There are more than 256 warnings. Ignoring the rest.");
- m_errorList.push_back(err);
- }
-
- if (m_warningCount >= c_maxWarningsAllowed)
- return true;
- }
- else
- {
- m_errorCount++;
-
- if (m_errorCount > c_maxErrorsAllowed)
- {
- auto err = make_shared<Error>(Error::Type::Warning);
- *err << errinfo_comment("There are more than 256 errors. Aborting.");
- m_errorList.push_back(err);
- BOOST_THROW_EXCEPTION(FatalError());
- }
- }
-
- return false;
-}
-
-void ErrorReporter::fatalError(Error::Type _type, SourceLocation const& _location, string const& _description)
-{
- error(_type, _location, _description);
- BOOST_THROW_EXCEPTION(FatalError());
-}
-
-ErrorList const& ErrorReporter::errors() const
-{
- return m_errorList;
-}
-
-void ErrorReporter::clear()
-{
- m_errorList.clear();
-}
-
-void ErrorReporter::declarationError(SourceLocation const& _location, SecondarySourceLocation const&_secondaryLocation, string const& _description)
-{
- error(
- Error::Type::DeclarationError,
- _location,
- _secondaryLocation,
- _description
- );
-}
-
-void ErrorReporter::declarationError(SourceLocation const& _location, string const& _description)
-{
- error(
- Error::Type::DeclarationError,
- _location,
- _description
- );
-}
-
-void ErrorReporter::fatalDeclarationError(SourceLocation const& _location, std::string const& _description)
-{
- fatalError(
- Error::Type::DeclarationError,
- _location,
- _description);
-}
-
-void ErrorReporter::parserError(SourceLocation const& _location, string const& _description)
-{
- error(
- Error::Type::ParserError,
- _location,
- _description
- );
-}
-
-void ErrorReporter::fatalParserError(SourceLocation const& _location, string const& _description)
-{
- fatalError(
- Error::Type::ParserError,
- _location,
- _description
- );
-}
-
-void ErrorReporter::syntaxError(SourceLocation const& _location, string const& _description)
-{
- error(
- Error::Type::SyntaxError,
- _location,
- _description
- );
-}
-
-void ErrorReporter::typeError(SourceLocation const& _location, SecondarySourceLocation const& _secondaryLocation, string const& _description)
-{
- error(
- Error::Type::TypeError,
- _location,
- _secondaryLocation,
- _description
- );
-}
-
-void ErrorReporter::typeError(SourceLocation const& _location, string const& _description)
-{
- error(
- Error::Type::TypeError,
- _location,
- _description
- );
-}
-
-
-void ErrorReporter::fatalTypeError(SourceLocation const& _location, string const& _description)
-{
- fatalError(Error::Type::TypeError,
- _location,
- _description
- );
-}
-
-void ErrorReporter::docstringParsingError(string const& _description)
-{
- error(
- Error::Type::DocstringParsingError,
- SourceLocation(),
- _description
- );
-}
diff --git a/libsolidity/interface/ErrorReporter.h b/libsolidity/interface/ErrorReporter.h
deleted file mode 100644
index fd53587a..00000000
--- a/libsolidity/interface/ErrorReporter.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- This file is part of solidity.
-
- solidity is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- solidity is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with solidity. If not, see <http://www.gnu.org/licenses/>.
-*/
-/**
- * @author Rhett <roadriverrail@gmail.com>
- * @date 2017
- * Error reporting helper class.
- */
-
-#pragma once
-
-#include <libsolidity/interface/Exceptions.h>
-#include <libevmasm/SourceLocation.h>
-
-namespace dev
-{
-namespace solidity
-{
-
-class ASTNode;
-
-class ErrorReporter
-{
-public:
-
- explicit ErrorReporter(ErrorList& _errors):
- m_errorList(_errors) { }
-
- ErrorReporter(ErrorReporter const& _errorReporter) noexcept:
- m_errorList(_errorReporter.m_errorList) { }
-
- ErrorReporter& operator=(ErrorReporter const& _errorReporter);
-
- void warning(std::string const& _description);
-
- void warning(SourceLocation const& _location, std::string const& _description);
-
- void warning(
- SourceLocation const& _location,
- std::string const& _description,
- SecondarySourceLocation const& _secondaryLocation
- );
-
- void error(
- Error::Type _type,
- SourceLocation const& _location,
- std::string const& _description
- );
-
- void declarationError(
- SourceLocation const& _location,
- SecondarySourceLocation const& _secondaryLocation,
- std::string const& _description
- );
-
- void declarationError(SourceLocation const& _location, std::string const& _description);
-
- void fatalDeclarationError(SourceLocation const& _location, std::string const& _description);
-
- void parserError(SourceLocation const& _location, std::string const& _description);
-
- void fatalParserError(SourceLocation const& _location, std::string const& _description);
-
- void syntaxError(SourceLocation const& _location, std::string const& _description);
-
- void typeError(
- SourceLocation const& _location,
- SecondarySourceLocation const& _secondaryLocation = SecondarySourceLocation(),
- std::string const& _description = std::string()
- );
-
- void typeError(SourceLocation const& _location, std::string const& _description);
-
- void fatalTypeError(SourceLocation const& _location, std::string const& _description);
-
- void docstringParsingError(std::string const& _description);
-
- ErrorList const& errors() const;
-
- void clear();
-
- /// @returns true iff there is any error (ignores warnings).
- bool hasErrors() const
- {
- return m_errorCount > 0;
- }
-
-private:
- void error(Error::Type _type,
- SourceLocation const& _location,
- SecondarySourceLocation const& _secondaryLocation,
- std::string const& _description = std::string());
-
- void fatalError(Error::Type _type,
- SourceLocation const& _location = SourceLocation(),
- std::string const& _description = std::string());
-
- // @returns true if error shouldn't be stored
- bool checkForExcessiveErrors(Error::Type _type);
-
- ErrorList& m_errorList;
-
- unsigned m_errorCount = 0;
- unsigned m_warningCount = 0;
-
- const unsigned c_maxWarningsAllowed = 256;
- const unsigned c_maxErrorsAllowed = 256;
-};
-
-
-}
-}
-
diff --git a/libsolidity/interface/Exceptions.cpp b/libsolidity/interface/Exceptions.cpp
deleted file mode 100644
index ecadd0b7..00000000
--- a/libsolidity/interface/Exceptions.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- This file is part of solidity.
-
- solidity is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- solidity is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with solidity. If not, see <http://www.gnu.org/licenses/>.
-*/
-/**
- * @author Liana <liana@ethdev.com>
- * @date 2015
- * Solidity exception hierarchy.
- */
-
-#include <libsolidity/interface/Exceptions.h>
-
-using namespace std;
-using namespace dev;
-using namespace dev::solidity;
-
-Error::Error(Type _type, SourceLocation const& _location, string const& _description):
- m_type(_type)
-{
- switch(m_type)
- {
- case Type::DeclarationError:
- m_typeName = "DeclarationError";
- break;
- case Type::DocstringParsingError:
- m_typeName = "DocstringParsingError";
- break;
- case Type::ParserError:
- m_typeName = "ParserError";
- break;
- case Type::SyntaxError:
- m_typeName = "SyntaxError";
- break;
- case Type::TypeError:
- m_typeName = "TypeError";
- break;
- case Type::Warning:
- m_typeName = "Warning";
- break;
- }
-
- if (!_location.isEmpty())
- *this << errinfo_sourceLocation(_location);
- if (!_description.empty())
- *this << errinfo_comment(_description);
-}
-
-Error::Error(Error::Type _type, const std::string& _description, const SourceLocation& _location):
- Error(_type)
-{
- if (!_location.isEmpty())
- *this << errinfo_sourceLocation(_location);
- *this << errinfo_comment(_description);
-}
diff --git a/libsolidity/interface/Exceptions.h b/libsolidity/interface/Exceptions.h
deleted file mode 100644
index 629b8f3f..00000000
--- a/libsolidity/interface/Exceptions.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- This file is part of solidity.
-
- solidity is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- solidity is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with solidity. If not, see <http://www.gnu.org/licenses/>.
-*/
-/**
- * @author Christian <c@ethdev.com>
- * @date 2014
- * Solidity exception hierarchy.
- */
-
-#pragma once
-
-#include <string>
-#include <utility>
-#include <libdevcore/Exceptions.h>
-#include <libdevcore/Assertions.h>
-#include <libevmasm/SourceLocation.h>
-
-namespace dev
-{
-namespace solidity
-{
-class Error;
-using ErrorList = std::vector<std::shared_ptr<Error const>>;
-
-struct CompilerError: virtual Exception {};
-struct InternalCompilerError: virtual Exception {};
-struct FatalError: virtual Exception {};
-struct UnimplementedFeatureError: virtual Exception{};
-
-/// Assertion that throws an InternalCompilerError containing the given description if it is not met.
-#define solAssert(CONDITION, DESCRIPTION) \
- assertThrow(CONDITION, ::dev::solidity::InternalCompilerError, DESCRIPTION)
-
-#define solUnimplementedAssert(CONDITION, DESCRIPTION) \
- assertThrow(CONDITION, ::dev::solidity::UnimplementedFeatureError, DESCRIPTION)
-
-#define solUnimplemented(DESCRIPTION) \
- solUnimplementedAssert(false, DESCRIPTION)
-
-class Error: virtual public Exception
-{
-public:
- enum class Type
- {
- DeclarationError,
- DocstringParsingError,
- ParserError,
- TypeError,
- SyntaxError,
- Warning
- };
-
- explicit Error(
- Type _type,
- SourceLocation const& _location = SourceLocation(),
- std::string const& _description = std::string()
- );
-
- Error(Type _type, std::string const& _description, SourceLocation const& _location = SourceLocation());
-
- Type type() const { return m_type; }
- std::string const& typeName() const { return m_typeName; }
-
- /// helper functions
- static Error const* containsErrorOfType(ErrorList const& _list, Error::Type _type)
- {
- for (auto e: _list)
- {
- if (e->type() == _type)
- return e.get();
- }
- return nullptr;
- }
- static bool containsOnlyWarnings(ErrorList const& _list)
- {
- for (auto e: _list)
- {
- if (e->type() != Type::Warning)
- return false;
- }
- return true;
- }
-private:
- Type m_type;
- std::string m_typeName;
-};
-
-
-using errorSourceLocationInfo = std::pair<std::string, SourceLocation>;
-
-class SecondarySourceLocation
-{
-public:
- SecondarySourceLocation& append(std::string const& _errMsg, SourceLocation const& _sourceLocation)
- {
- infos.push_back(std::make_pair(_errMsg, _sourceLocation));
- return *this;
- }
- /// Limits the number of secondary source locations to 32 and appends a notice to the
- /// error message.
- void limitSize(std::string& _message)
- {
- size_t occurrences = infos.size();
- if (occurrences > 32)
- {
- infos.resize(32);
- _message += " Truncated from " + std::to_string(occurrences) + " to the first 32 occurrences.";
- }
- }
-
- std::vector<errorSourceLocationInfo> infos;
-};
-
-
-using errinfo_sourceLocation = boost::error_info<struct tag_sourceLocation, SourceLocation>;
-using errinfo_secondarySourceLocation = boost::error_info<struct tag_secondarySourceLocation, SecondarySourceLocation>;
-
-}
-}
diff --git a/libsolidity/interface/GasEstimator.h b/libsolidity/interface/GasEstimator.h
index ea94d988..214a3e58 100644
--- a/libsolidity/interface/GasEstimator.h
+++ b/libsolidity/interface/GasEstimator.h
@@ -22,7 +22,7 @@
#pragma once
-#include <libsolidity/interface/EVMVersion.h>
+#include <liblangutil/EVMVersion.h>
#include <libevmasm/GasMeter.h>
#include <libevmasm/Assembly.h>
diff --git a/libsolidity/interface/SourceReferenceFormatter.cpp b/libsolidity/interface/SourceReferenceFormatter.cpp
index 865907e2..9e2c988e 100644
--- a/libsolidity/interface/SourceReferenceFormatter.cpp
+++ b/libsolidity/interface/SourceReferenceFormatter.cpp
@@ -21,8 +21,8 @@
*/
#include <libsolidity/interface/SourceReferenceFormatter.h>
-#include <libsolidity/parsing/Scanner.h>
-#include <libsolidity/interface/Exceptions.h>
+#include <liblangutil/Scanner.h>
+#include <liblangutil/Exceptions.h>
using namespace std;
diff --git a/libsolidity/interface/SourceReferenceFormatter.h b/libsolidity/interface/SourceReferenceFormatter.h
index a32babdc..281a4bdc 100644
--- a/libsolidity/interface/SourceReferenceFormatter.h
+++ b/libsolidity/interface/SourceReferenceFormatter.h
@@ -25,7 +25,7 @@
#include <ostream>
#include <sstream>
#include <functional>
-#include <libevmasm/SourceLocation.h>
+#include <liblangutil/SourceLocation.h>
namespace dev
{
diff --git a/libsolidity/interface/Version.cpp b/libsolidity/interface/Version.cpp
index b5f68ce8..b785d557 100644
--- a/libsolidity/interface/Version.cpp
+++ b/libsolidity/interface/Version.cpp
@@ -24,7 +24,7 @@
#include <string>
#include <libdevcore/CommonData.h>
#include <libdevcore/Common.h>
-#include <libsolidity/interface/Exceptions.h>
+#include <liblangutil/Exceptions.h>
#include <solidity/BuildInfo.h>
using namespace dev;