summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/InstrumentLocals.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passes/InstrumentLocals.cpp b/src/passes/InstrumentLocals.cpp
index 8c8cc2c9c..6e12b0f3a 100644
--- a/src/passes/InstrumentLocals.cpp
+++ b/src/passes/InstrumentLocals.cpp
@@ -159,8 +159,10 @@ struct InstrumentLocals : public WalkerPass<PostWalker<InstrumentLocals>> {
if (curr->features.hasReferenceTypes()) {
addImport(curr, get_anyref, "aiia");
- addImport(curr, get_exnref, "eiie");
addImport(curr, set_anyref, "aiia");
+ }
+ if (curr->features.hasExceptionHandling()) {
+ addImport(curr, get_exnref, "eiie");
addImport(curr, set_exnref, "eiie");
}
}