diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-08-24 18:53:06 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-08-25 16:04:35 -0700 |
commit | 4367194dc08e981b85effc2127564f53ecbc0af1 (patch) | |
tree | 37611c760efa4c9acd86892ad6f4cbb3d917a160 /src/wasm/wasm.cpp | |
parent | db3adf6c6a6a34bb23f0a91a7fad568dfa906062 (diff) | |
download | binaryen-4367194dc08e981b85effc2127564f53ecbc0af1.tar.gz binaryen-4367194dc08e981b85effc2127564f53ecbc0af1.tar.bz2 binaryen-4367194dc08e981b85effc2127564f53ecbc0af1.zip |
set the type of a set_local properly when it is unreachable
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r-- | src/wasm/wasm.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index f82a06e68..ab2db6bd5 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -332,6 +332,10 @@ void SetLocal::setTee(bool is) { void SetLocal::finalize() { if (value->type == unreachable) { type = unreachable; + } else if (isTee()) { + type = value->type; + } else { + type = none; } } |