aboutsummaryrefslogtreecommitdiffstats
path: root/solc
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-22 03:35:27 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-10-19 06:32:33 +0800
commit039cc25b1fd875e9f4cfd0f0649f2b4ed67640e1 (patch)
tree9ce832cfbff61de9911817bbfd4c09a833a61ca9 /solc
parent7454a766b37951674095afdd0c8573713e2511a4 (diff)
downloaddexon-solidity-039cc25b1fd875e9f4cfd0f0649f2b4ed67640e1.tar
dexon-solidity-039cc25b1fd875e9f4cfd0f0649f2b4ed67640e1.tar.gz
dexon-solidity-039cc25b1fd875e9f4cfd0f0649f2b4ed67640e1.tar.bz2
dexon-solidity-039cc25b1fd875e9f4cfd0f0649f2b4ed67640e1.tar.lz
dexon-solidity-039cc25b1fd875e9f4cfd0f0649f2b4ed67640e1.tar.xz
dexon-solidity-039cc25b1fd875e9f4cfd0f0649f2b4ed67640e1.tar.zst
dexon-solidity-039cc25b1fd875e9f4cfd0f0649f2b4ed67640e1.zip
Always require a contract/sourceName in CompilerStack
Diffstat (limited to 'solc')
-rw-r--r--solc/CommandLineInterface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index 1686dc2e..3ab564c3 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -951,9 +951,10 @@ void CommandLineInterface::handleAst(string const& _argStr)
for (auto const& sourceCode: m_sourceCodes)
asts.push_back(&m_compiler->ast(sourceCode.first));
map<ASTNode const*, eth::GasMeter::GasConsumption> gasCosts;
- if (m_compiler->runtimeAssemblyItems())
+ // FIXME: shouldn't this be done for every contract?
+ if (m_compiler->runtimeAssemblyItems(""))
gasCosts = GasEstimator::breakToStatementLevel(
- GasEstimator::structuralEstimation(*m_compiler->runtimeAssemblyItems(), asts),
+ GasEstimator::structuralEstimation(*m_compiler->runtimeAssemblyItems(""), asts),
asts
);