aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/optimiser/UnusedPruner.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/UnusedPruner.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/UnusedPruner.cpp')
-rw-r--r--libjulia/optimiser/UnusedPruner.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libjulia/optimiser/UnusedPruner.cpp b/libjulia/optimiser/UnusedPruner.cpp
index 50038431..54e8fd6e 100644
--- a/libjulia/optimiser/UnusedPruner.cpp
+++ b/libjulia/optimiser/UnusedPruner.cpp
@@ -23,6 +23,7 @@
#include <libjulia/optimiser/NameCollector.h>
#include <libjulia/optimiser/Semantics.h>
#include <libjulia/optimiser/Utilities.h>
+#include <libjulia/Exceptions.h>
#include <libsolidity/inlineasm/AsmData.h>
@@ -108,8 +109,8 @@ void UnusedPruner::subtractReferences(map<string, size_t> const& _subtrahend)
{
for (auto const& ref: _subtrahend)
{
- solAssert(m_references.count(ref.first), "");
- solAssert(m_references.at(ref.first) >= ref.second, "");
+ assertThrow(m_references.count(ref.first), OptimizerException, "");
+ assertThrow(m_references.at(ref.first) >= ref.second, OptimizerException, "");
m_references[ref.first] -= ref.second;
m_shouldRunAgain = true;
}