diff options
Diffstat (limited to 'src/passes/InstrumentLocals.cpp')
-rw-r--r-- | src/passes/InstrumentLocals.cpp | 22 |
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) { |