mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6336 from ethereum/compilerstack-addsource
Removed unused isLibrary from flag addSource in CompilerStack
This commit is contained in:
commit
e3c1dea97c
@ -160,12 +160,11 @@ void CompilerStack::reset(bool _keepSources)
|
||||
m_errorReporter.clear();
|
||||
}
|
||||
|
||||
bool CompilerStack::addSource(string const& _name, string const& _content, bool _isLibrary)
|
||||
bool CompilerStack::addSource(string const& _name, string const& _content)
|
||||
{
|
||||
bool existed = m_sources.count(_name) != 0;
|
||||
reset(true);
|
||||
m_sources[_name].scanner = make_shared<Scanner>(CharStream(_content, _name));
|
||||
m_sources[_name].isLibrary = _isLibrary;
|
||||
m_stackState = SourcesSet;
|
||||
return existed;
|
||||
}
|
||||
@ -828,8 +827,7 @@ void CompilerStack::resolveImports()
|
||||
};
|
||||
|
||||
for (auto const& sourcePair: m_sources)
|
||||
if (!sourcePair.second.isLibrary)
|
||||
toposort(&sourcePair.second);
|
||||
toposort(&sourcePair.second);
|
||||
|
||||
swap(m_sourceOrder, sourceOrder);
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public:
|
||||
|
||||
/// Adds a source object (e.g. file) to the parser. After this, parse has to be called again.
|
||||
/// @returns true if a source object by the name already existed and was replaced.
|
||||
bool addSource(std::string const& _name, std::string const& _content, bool _isLibrary = false);
|
||||
bool addSource(std::string const& _name, std::string const& _content);
|
||||
|
||||
/// Adds a response to an SMTLib2 query (identified by the hash of the query input).
|
||||
/// Must be set before parsing.
|
||||
@ -261,7 +261,6 @@ private:
|
||||
{
|
||||
std::shared_ptr<langutil::Scanner> scanner;
|
||||
std::shared_ptr<SourceUnit> ast;
|
||||
bool isLibrary = false;
|
||||
h256 mutable keccak256HashCached;
|
||||
h256 mutable swarmHashCached;
|
||||
void reset() { *this = Source(); }
|
||||
|
Loading…
Reference in New Issue
Block a user