summaryrefslogtreecommitdiff
path: root/src/dataflow
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-12-04 20:42:46 -0600
committerGitHub <noreply@github.com>2019-12-04 20:42:46 -0600
commitcbf121df96cfce5038f52ed04f9780e19ed3b762 (patch)
tree44326027dcc3fb1e130cbb94bed27310a600f827 /src/dataflow
parent255d28a7bd903cedacc9ca0a00b7379188bf17bc (diff)
downloadbinaryen-cbf121df96cfce5038f52ed04f9780e19ed3b762.tar.gz
binaryen-cbf121df96cfce5038f52ed04f9780e19ed3b762.tar.bz2
binaryen-cbf121df96cfce5038f52ed04f9780e19ed3b762.zip
Add BYN_ENABLE_ASSERTSION option to allow assertions to be disabled. (#2500)
We always enable assertions by default, but this options allows for a build without them. Fix all errors in the ASSERTIONS=OFF build, even though we don't normally build this its good to keep it building.
Diffstat (limited to 'src/dataflow')
-rw-r--r--src/dataflow/graph.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dataflow/graph.h b/src/dataflow/graph.h
index a243b0fff..2d9b87873 100644
--- a/src/dataflow/graph.h
+++ b/src/dataflow/graph.h
@@ -652,9 +652,11 @@ struct Graph : public UnifiedExpressionVisitor<Graph, Node*> {
// Merge local state for multiple control flow paths, creating phis as needed.
void merge(std::vector<FlowState>& states, Locals& out) {
// We should only receive reachable states.
+#ifndef NDEBUG
for (auto& state : states) {
assert(!isInUnreachable(state.locals));
}
+#endif
Index numStates = states.size();
if (numStates == 0) {
// We were unreachable, and still are.