diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-10-10 10:10:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 10:10:22 -0700 |
commit | 874fc0897484d97cf94c0eb898ca5fabe7a9b34a (patch) | |
tree | e58d0864df207d18805b9c5171dd2142795ab98d /src | |
parent | fcbe7bff9e21e63f8c74a71f167aaf225cca0b79 (diff) | |
download | binaryen-874fc0897484d97cf94c0eb898ca5fabe7a9b34a.tar.gz binaryen-874fc0897484d97cf94c0eb898ca5fabe7a9b34a.tar.bz2 binaryen-874fc0897484d97cf94c0eb898ca5fabe7a9b34a.zip |
fix wasm-builder set_global creation - we must call finalize, as the value may be unreachable (#1216)
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-builder.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 4591c9c0d..cca97a869 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -192,6 +192,7 @@ public: auto* ret = allocator.alloc<SetGlobal>(); ret->name = name; ret->value = value; + ret->finalize(); return ret; } Load* makeLoad(unsigned bytes, bool signed_, uint32_t offset, unsigned align, Expression *ptr, WasmType type) { |