From c6cd444496c4c1b684dbc69b10fc2f5cbfdd8e47 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 11 Oct 2019 00:30:06 -0700 Subject: 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. --- src/passes/InstrumentLocals.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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> { 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"); } } -- cgit v1.2.3