diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-30 09:15:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-30 09:15:48 -0700 |
commit | 2a543b48db250ea9cd7172b6db9a0b8d3657475a (patch) | |
tree | 1bc6866bf79eb2f661345bb04e3fa49c857311f5 /src | |
parent | a82528f17feba6b1c34794c645ea5c78892a57d0 (diff) | |
download | binaryen-2a543b48db250ea9cd7172b6db9a0b8d3657475a.tar.gz binaryen-2a543b48db250ea9cd7172b6db9a0b8d3657475a.tar.bz2 binaryen-2a543b48db250ea9cd7172b6db9a0b8d3657475a.zip |
validate drop (#712)
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-validator.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 3616313d3..3c580ce51 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -303,12 +303,7 @@ public: } void visitDrop(Drop* curr) { - // TODO: assert on this, when tests pass - if (getenv("BINARYEN_WARN_DROP")) { - if (!(isConcreteWasmType(curr->value->type) || curr->value->type == unreachable)) { - std::cerr << "warning: bad drop " << curr << " in " << (getFunction() ? getFunction()->name : Name("?")) << '\n'; - } - } + shouldBeTrue(isConcreteWasmType(curr->value->type) || curr->value->type == unreachable, curr, "can only drop a valid value"); } void visitReturn(Return* curr) { |