diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-10-11 00:30:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-11 00:30:06 -0700 |
commit | c6cd444496c4c1b684dbc69b10fc2f5cbfdd8e47 (patch) | |
tree | 0e921050a69d9942c3fdbc62ad87e6b0d7aa9398 /src | |
parent | 4507ee5767b62095b29ca3b9c775475400f5423a (diff) | |
download | binaryen-c6cd444496c4c1b684dbc69b10fc2f5cbfdd8e47.tar.gz binaryen-c6cd444496c4c1b684dbc69b10fc2f5cbfdd8e47.tar.bz2 binaryen-c6cd444496c4c1b684dbc69b10fc2f5cbfdd8e47.zip |
Enable exnref instrumentation when EH is enabled (#2379)
`exnref` is enabled by not reference type feature but exception handling
feature. Sorry that I missed this in #2377.
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/InstrumentLocals.cpp | 4 |
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"); } } |