aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/optimiser/MainFunction.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-05-09 17:43:14 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-05-09 18:28:49 +0800
commit591c591af05f29bf42b8b162a4fcda5a9a8fae9f (patch)
treea448d572df111ba938bbca43098864852507236a /libjulia/optimiser/MainFunction.cpp
parent7bbfd77e8e924f4946fcc99d4334d7e8ad3cc8de (diff)
downloaddexon-solidity-591c591af05f29bf42b8b162a4fcda5a9a8fae9f.tar
dexon-solidity-591c591af05f29bf42b8b162a4fcda5a9a8fae9f.tar.gz
dexon-solidity-591c591af05f29bf42b8b162a4fcda5a9a8fae9f.tar.bz2
dexon-solidity-591c591af05f29bf42b8b162a4fcda5a9a8fae9f.tar.lz
dexon-solidity-591c591af05f29bf42b8b162a4fcda5a9a8fae9f.tar.xz
dexon-solidity-591c591af05f29bf42b8b162a4fcda5a9a8fae9f.tar.zst
dexon-solidity-591c591af05f29bf42b8b162a4fcda5a9a8fae9f.zip
Do not use solAssert within libjulia
Diffstat (limited to 'libjulia/optimiser/MainFunction.cpp')
-rw-r--r--libjulia/optimiser/MainFunction.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/libjulia/optimiser/MainFunction.cpp b/libjulia/optimiser/MainFunction.cpp
index 0b3e674b..bcd2f178 100644
--- a/libjulia/optimiser/MainFunction.cpp
+++ b/libjulia/optimiser/MainFunction.cpp
@@ -22,11 +22,10 @@
#include <libjulia/optimiser/MainFunction.h>
#include <libjulia/optimiser/NameCollector.h>
+#include <libjulia/Exceptions.h>
#include <libsolidity/inlineasm/AsmData.h>
-#include <libsolidity/interface/Exceptions.h>
-
#include <libdevcore/CommonData.h>
using namespace std;
@@ -36,12 +35,12 @@ using namespace dev::solidity;
void MainFunction::operator()(Block& _block)
{
- solAssert(_block.statements.size() >= 1, "");
- solAssert(_block.statements[0].type() == typeid(Block), "");
+ assertThrow(_block.statements.size() >= 1, OptimizerException, "");
+ assertThrow(_block.statements[0].type() == typeid(Block), OptimizerException, "");
for (size_t i = 1; i < _block.statements.size(); ++i)
- solAssert(_block.statements.at(i).type() == typeid(FunctionDefinition), "");
+ assertThrow(_block.statements.at(i).type() == typeid(FunctionDefinition), OptimizerException, "");
/// @todo this should handle scopes properly and instead of an assertion it should rename the conflicting function
- solAssert(NameCollector(_block).names().count("main") == 0, "");
+ assertThrow(NameCollector(_block).names().count("main") == 0, OptimizerException, "");
Block& block = boost::get<Block>(_block.statements[0]);
FunctionDefinition main{