aboutsummaryrefslogtreecommitdiffstats
path: root/libyul/Exceptions.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-29 03:46:34 +0800
committerGitHub <noreply@github.com>2018-10-29 03:46:34 +0800
commitacf92930ba02126f32f1e532db89dd5737168289 (patch)
tree65b546b7d450c7b5318de536f76fc3d154a5dc59 /libyul/Exceptions.h
parentc338b422d48694b9fa4491c572e3a5e742a8ed36 (diff)
parentf08ab772499923ccea29806525c7f2589bc5b343 (diff)
downloaddexon-solidity-acf92930ba02126f32f1e532db89dd5737168289.tar.gz
dexon-solidity-acf92930ba02126f32f1e532db89dd5737168289.tar.zst
dexon-solidity-acf92930ba02126f32f1e532db89dd5737168289.zip
Merge pull request #5247 from ethereum/yul-vardecl-propagation
Yul: Implements empty-var-decl-propagation
Diffstat (limited to 'libyul/Exceptions.h')
-rw-r--r--libyul/Exceptions.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libyul/Exceptions.h b/libyul/Exceptions.h
index c423b66f..0c421dbf 100644
--- a/libyul/Exceptions.h
+++ b/libyul/Exceptions.h
@@ -30,6 +30,11 @@ namespace yul
struct YulException: virtual Exception {};
struct OptimizerException: virtual YulException {};
+struct YulAssertion: virtual YulException {};
+
+/// Assertion that throws an YulAssertion containing the given description if it is not met.
+#define yulAssert(CONDITION, DESCRIPTION) \
+ assertThrow(CONDITION, ::dev::yul::YulException, DESCRIPTION)
}
}