summaryrefslogtreecommitdiff
path: root/src/passes/InstrumentLocals.cpp
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/passes/InstrumentLocals.cpp
parent71c9572e8bdcf05306e6df1fb3bd1afc924d2f83 (diff)
downloadbinaryen-481e3eeade76a07a250979e2fbe0072d2662fe7d.tar.gz
binaryen-481e3eeade76a07a250979e2fbe0072d2662fe7d.tar.bz2
binaryen-481e3eeade76a07a250979e2fbe0072d2662fe7d.zip
Add a builder.makeConst helper template (#2971)
Diffstat (limited to 'src/passes/InstrumentLocals.cpp')
-rw-r--r--src/passes/InstrumentLocals.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/passes/InstrumentLocals.cpp b/src/passes/InstrumentLocals.cpp
index 2c74e5794..0bf22d29b 100644
--- a/src/passes/InstrumentLocals.cpp
+++ b/src/passes/InstrumentLocals.cpp
@@ -107,12 +107,11 @@ struct InstrumentLocals : public WalkerPass<PostWalker<InstrumentLocals>> {
case Type::unreachable:
WASM_UNREACHABLE("unexpected type");
}
- replaceCurrent(
- builder.makeCall(import,
- {builder.makeConst(Literal(int32_t(id++))),
- builder.makeConst(Literal(int32_t(curr->index))),
- curr},
- curr->type));
+ replaceCurrent(builder.makeCall(import,
+ {builder.makeConst(int32_t(id++)),
+ builder.makeConst(int32_t(curr->index)),
+ curr},
+ curr->type));
}
void visitLocalSet(LocalSet* curr) {
@@ -157,12 +156,11 @@ struct InstrumentLocals : public WalkerPass<PostWalker<InstrumentLocals>> {
case Type::none:
WASM_UNREACHABLE("unexpected type");
}
- curr->value =
- builder.makeCall(import,
- {builder.makeConst(Literal(int32_t(id++))),
- builder.makeConst(Literal(int32_t(curr->index))),
- curr->value},
- curr->value->type);
+ curr->value = builder.makeCall(import,
+ {builder.makeConst(int32_t(id++)),
+ builder.makeConst(int32_t(curr->index)),
+ curr->value},
+ curr->value->type);
}
void visitModule(Module* curr) {