summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-11-17 19:20:30 -0800
committerGitHub <noreply@github.com>2022-11-17 19:20:30 -0800
commitb23cedccaede2c2341d581fcf6674a36638ed165 (patch)
tree7c7be6fd8491e7f3b1649bbb31013a0faf2797c6 /src
parent788cb172fb4081fc0f308458d737be7133b444d7 (diff)
downloadbinaryen-b23cedccaede2c2341d581fcf6674a36638ed165.tar.gz
binaryen-b23cedccaede2c2341d581fcf6674a36638ed165.tar.bz2
binaryen-b23cedccaede2c2341d581fcf6674a36638ed165.zip
Fix inverted logic bug with asyncify-ignore-indirect (#5275)
Diffstat (limited to 'src')
-rw-r--r--src/passes/Asyncify.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/Asyncify.cpp b/src/passes/Asyncify.cpp
index df292317a..661086408 100644
--- a/src/passes/Asyncify.cpp
+++ b/src/passes/Asyncify.cpp
@@ -1534,9 +1534,9 @@ struct Asyncify : public Pass {
bool allImportsCanChangeState =
stateChangingImports == "" && ignoreImports == "";
String::Split listedImports(stateChangingImports, ",");
- // TODO: consider renaming asyncify-ignore-indirect to
- // asyncify-ignore-nondirect, but that could break users.
- auto ignoreNonDirect =
+ // canIndirectChangeState is the default. asyncify-ignore-indirect sets it
+ // to false.
+ auto canIndirectChangeState =
options.getArgumentOrDefault("asyncify-ignore-indirect", "") == "";
std::string removeListInput =
options.getArgumentOrDefault("asyncify-removelist", "");
@@ -1603,7 +1603,7 @@ struct Asyncify : public Pass {
// Scan the module.
ModuleAnalyzer analyzer(*module,
canImportChangeState,
- ignoreNonDirect,
+ canIndirectChangeState,
removeList,
addList,
onlyList,