summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-01-25 13:10:57 -0800
committerGitHub <noreply@github.com>2023-01-25 13:10:57 -0800
commit720d64413af87518863bf481113702520bb81f7e (patch)
treed858149b8893e2555b343cf75d5c94390d00f984 /src
parent48c861523b21672a8ddb6216bab0e9e31b4abe7a (diff)
downloadbinaryen-720d64413af87518863bf481113702520bb81f7e.tar.gz
binaryen-720d64413af87518863bf481113702520bb81f7e.tar.bz2
binaryen-720d64413af87518863bf481113702520bb81f7e.zip
Avoid spurious warnings in pass skipping (#5451)
Nested runners should be ignored, as they run some internal stuff in certain passes, which would not contain the pass the user asked to skip with --skip-pass.
Diffstat (limited to 'src')
-rw-r--r--src/passes/pass.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp
index 593023c7c..13d700af9 100644
--- a/src/passes/pass.cpp
+++ b/src/passes/pass.cpp
@@ -816,13 +816,17 @@ void PassRunner::run() {
flush();
}
- // All the passes the user requested to skip should have been seen, and
- // skipped. If not, the user may have had a typo in the name of a pass to
- // skip, and we will warn.
- for (auto pass : options.passesToSkip) {
- if (!skippedPasses.count(pass)) {
- std::cerr << "warning: --" << pass << " was requested to be skipped, "
- << "but it was not found in the passes that were run.\n";
+ if (!isNested) {
+ // All the passes the user requested to skip should have been seen, and
+ // skipped. If not, the user may have had a typo in the name of a pass to
+ // skip, and we will warn. (We don't do this in a nested runner because
+ // those are used for various internal tasks inside passes, which would lead
+ // to many spurious warnings.)
+ for (auto pass : options.passesToSkip) {
+ if (!skippedPasses.count(pass)) {
+ std::cerr << "warning: --" << pass << " was requested to be skipped, "
+ << "but it was not found in the passes that were run.\n";
+ }
}
}
}