summaryrefslogtreecommitdiff
path: root/src/passes/LegalizeJSInterface.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-10-11 17:37:34 -0700
committerGitHub <noreply@github.com>2021-10-11 17:37:34 -0700
commitc06b2925232b92fd379a3e8d513ab361b8434a15 (patch)
tree41adcc814063c9f4277bc339e16dacb8a2195cfc /src/passes/LegalizeJSInterface.cpp
parentecda340b791be6c0a31c7dd290a682244aff3e89 (diff)
downloadbinaryen-c06b2925232b92fd379a3e8d513ab361b8434a15.tar.gz
binaryen-c06b2925232b92fd379a3e8d513ab361b8434a15.tar.bz2
binaryen-c06b2925232b92fd379a3e8d513ab361b8434a15.zip
Add runOnModuleCode helper. NFC (#4234)
This method is in parallel to runOnFunction above it. It sets the runner and then does the walk, like that method. Also set runner to nullptr by default. I noticed ubsan was warning on things here, which this should avoid, but otherwise I'm not aware of an actual bug, so this should be NFC. But it does provide a safer API that should avoid future bugs.
Diffstat (limited to 'src/passes/LegalizeJSInterface.cpp')
-rw-r--r--src/passes/LegalizeJSInterface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp
index e7a5f9220..e5a69beb1 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -143,7 +143,7 @@ struct LegalizeJSInterface : public Pass {
Fixer fixer(&illegalImportsToLegal);
fixer.run(runner, module);
- fixer.walkModuleCode(module);
+ fixer.runOnModuleCode(runner, module);
// Finally we can remove all the now-unused illegal imports
for (const auto& pair : illegalImportsToLegal) {