summaryrefslogtreecommitdiff
path: root/src/passes/NoInline.cpp
diff options
context:
space:
mode:
authorChristian Speckner <christian.speckner@mayflower.de>2024-07-16 01:04:37 +0200
committerGitHub <noreply@github.com>2024-07-15 16:04:37 -0700
commitfd8b2bd43d73cf1976426e60c22c5261fa343510 (patch)
tree79d1fbc91d65ba0f8a4a6b3db0ca070b0628ebda /src/passes/NoInline.cpp
parentaec516f1259c3fec92982db92dc0e4e67ab2251a (diff)
downloadbinaryen-fd8b2bd43d73cf1976426e60c22c5261fa343510.tar.gz
binaryen-fd8b2bd43d73cf1976426e60c22c5261fa343510.tar.bz2
binaryen-fd8b2bd43d73cf1976426e60c22c5261fa343510.zip
Allow different arguments for multiple instances of a pass (#6687)
Each pass instance can now store an argument for it, which can be different. This may be a breaking change for the corner case of running a pass multiple times and setting the pass's argument multiple times as well (before, the last pass argument affected them all; now, it affects the last instance only). This only affects arguments with the name of a pass; others remain global, as before (and multiple passes can read them, in fact). See the CHANGELOG for details. Fixes #6646
Diffstat (limited to 'src/passes/NoInline.cpp')
-rw-r--r--src/passes/NoInline.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/NoInline.cpp b/src/passes/NoInline.cpp
index 59e4f7e2c..34f693e29 100644
--- a/src/passes/NoInline.cpp
+++ b/src/passes/NoInline.cpp
@@ -48,8 +48,8 @@ struct NoInline : public Pass {
NoInline(NoInlineMode mode) : mode(mode) {}
void run(Module* module) override {
- std::string pattern = getPassOptions().getArgument(
- name, "Usage usage: wasm-opt --" + name + "=WILDCARD");
+ std::string pattern =
+ getArgument(name, "Usage usage: wasm-opt --" + name + "=WILDCARD");
for (auto& func : module->functions) {
if (!String::wildcardMatch(pattern, func->name.toString())) {