Skip to content

Commit b23cedc

Browse files
authored
Fix inverted logic bug with asyncify-ignore-indirect (#5275)
1 parent 788cb17 commit b23cedc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/passes/Asyncify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,9 +1534,9 @@ struct Asyncify : public Pass {
15341534
bool allImportsCanChangeState =
15351535
stateChangingImports == "" && ignoreImports == "";
15361536
String::Split listedImports(stateChangingImports, ",");
1537-
// TODO: consider renaming asyncify-ignore-indirect to
1538-
// asyncify-ignore-nondirect, but that could break users.
1539-
auto ignoreNonDirect =
1537+
// canIndirectChangeState is the default. asyncify-ignore-indirect sets it
1538+
// to false.
1539+
auto canIndirectChangeState =
15401540
options.getArgumentOrDefault("asyncify-ignore-indirect", "") == "";
15411541
std::string removeListInput =
15421542
options.getArgumentOrDefault("asyncify-removelist", "");
@@ -1603,7 +1603,7 @@ struct Asyncify : public Pass {
16031603
// Scan the module.
16041604
ModuleAnalyzer analyzer(*module,
16051605
canImportChangeState,
1606-
ignoreNonDirect,
1606+
canIndirectChangeState,
16071607
removeList,
16081608
addList,
16091609
onlyList,

0 commit comments

Comments
 (0)