summaryrefslogtreecommitdiff
path: root/src/passes/InstrumentLocals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/InstrumentLocals.cpp')
-rw-r--r--src/passes/InstrumentLocals.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/passes/InstrumentLocals.cpp b/src/passes/InstrumentLocals.cpp
index 27c3acde5..8c8cc2c9c 100644
--- a/src/passes/InstrumentLocals.cpp
+++ b/src/passes/InstrumentLocals.cpp
@@ -105,6 +105,13 @@ struct InstrumentLocals : public WalkerPass<PostWalker<InstrumentLocals>> {
}
void visitLocalSet(LocalSet* curr) {
+ // We don't instrument pop instructions. They are automatically deleted when
+ // writing binary and generated when reading binary, so they don't work with
+ // local set/get instrumentation.
+ if (curr->value->is<Pop>()) {
+ return;
+ }
+
Builder builder(*getModule());
Name import;
switch (curr->value->type) {