mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11729 from ethereum/build-speedups
header file cleanups
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <libyul/AST.h>
|
||||
#include <libyul/Exceptions.h>
|
||||
|
||||
#include <liblangutil/Exceptions.h>
|
||||
#include <liblangutil/Scanner.h>
|
||||
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
|
||||
+16
-1
@@ -24,8 +24,9 @@
|
||||
#include <libyul/AST.h>
|
||||
#include <libyul/AsmParser.h>
|
||||
#include <libyul/Exceptions.h>
|
||||
#include <liblangutil/Scanner.h>
|
||||
#include <liblangutil/ErrorReporter.h>
|
||||
#include <liblangutil/Exceptions.h>
|
||||
#include <liblangutil/Scanner.h>
|
||||
#include <libsolutil/Common.h>
|
||||
#include <libsolutil/Visitor.h>
|
||||
|
||||
@@ -70,6 +71,20 @@ optional<int> toInt(string const& _value)
|
||||
|
||||
}
|
||||
|
||||
std::shared_ptr<DebugData const> Parser::createDebugData() const
|
||||
{
|
||||
switch (m_useSourceLocationFrom)
|
||||
{
|
||||
case UseSourceLocationFrom::Scanner:
|
||||
return DebugData::create(ParserBase::currentLocation());
|
||||
case UseSourceLocationFrom::LocationOverride:
|
||||
return DebugData::create(m_locationOverride);
|
||||
case UseSourceLocationFrom::Comments:
|
||||
return m_debugDataOverride;
|
||||
}
|
||||
solAssert(false, "");
|
||||
}
|
||||
|
||||
unique_ptr<Block> Parser::parse(std::shared_ptr<Scanner> const& _scanner, bool _reuseScanner)
|
||||
{
|
||||
m_recursionDepth = 0;
|
||||
|
||||
+2
-13
@@ -31,6 +31,7 @@
|
||||
#include <liblangutil/Scanner.h>
|
||||
#include <liblangutil/ParserBase.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
@@ -103,19 +104,7 @@ protected:
|
||||
void fetchSourceLocationFromComment();
|
||||
|
||||
/// Creates a DebugData object with the correct source location set.
|
||||
std::shared_ptr<DebugData const> createDebugData() const
|
||||
{
|
||||
switch (m_useSourceLocationFrom)
|
||||
{
|
||||
case UseSourceLocationFrom::Scanner:
|
||||
return DebugData::create(ParserBase::currentLocation());
|
||||
case UseSourceLocationFrom::LocationOverride:
|
||||
return DebugData::create(m_locationOverride);
|
||||
case UseSourceLocationFrom::Comments:
|
||||
return m_debugDataOverride;
|
||||
}
|
||||
solAssert(false, "");
|
||||
}
|
||||
std::shared_ptr<DebugData const> createDebugData() const;
|
||||
|
||||
/// Creates an inline assembly node with the current source location.
|
||||
template <class T> T createWithLocation() const
|
||||
|
||||
Reference in New Issue
Block a user