summaryrefslogtreecommitdiff
path: root/src/wasm
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-07-21 13:47:41 -0700
committerGitHub <noreply@github.com>2020-07-21 13:47:41 -0700
commit481e3eeade76a07a250979e2fbe0072d2662fe7d (patch)
treebb68e84f4288236356db41075948de18f16fd439 /src/wasm
parent71c9572e8bdcf05306e6df1fb3bd1afc924d2f83 (diff)
downloadbinaryen-481e3eeade76a07a250979e2fbe0072d2662fe7d.tar.gz
binaryen-481e3eeade76a07a250979e2fbe0072d2662fe7d.tar.bz2
binaryen-481e3eeade76a07a250979e2fbe0072d2662fe7d.zip
Add a builder.makeConst helper template (#2971)
Diffstat (limited to 'src/wasm')
-rw-r--r--src/wasm/wasm-emscripten.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp
index 4a8f2c0c3..2fcabb3b2 100644
--- a/src/wasm/wasm-emscripten.cpp
+++ b/src/wasm/wasm-emscripten.cpp
@@ -144,7 +144,7 @@ Function* EmscriptenGlueGenerator::generateAssignGOTEntriesFunction() {
}
// Make this an internal, non-imported, global.
g->module.clear();
- g->init = Builder(wasm).makeConst(Literal(0));
+ g->init = Builder(wasm).makeConst(int32_t(0));
}
if (!gotFuncEntries.size() && !gotMemEntries.size()) {
@@ -507,7 +507,7 @@ void EmscriptenGlueGenerator::enforceStackLimit() {
auto* stackLimit = builder.makeGlobal(STACK_LIMIT,
stackPointer->type,
- builder.makeConst(Literal(0)),
+ builder.makeConst(int32_t(0)),
Builder::Mutable);
wasm.addGlobal(stackLimit);