summaryrefslogtreecommitdiff
path: root/src/passes/pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r--src/passes/pass.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp
index 0d9bd62e5..260bc761b 100644
--- a/src/passes/pass.cpp
+++ b/src/passes/pass.cpp
@@ -262,9 +262,18 @@ void PassRegistry::registerPasses() {
"print-full", "print in full s-expression format", createFullPrinterPass);
registerPass(
"print-call-graph", "print call graph", createPrintCallGraphPass);
+
+ // Register PrintFunctionMap using its normal name.
registerPass("print-function-map",
"print a map of function indexes to names",
createPrintFunctionMapPass);
+ // Also register it as "symbolmap" so that wasm-opt --symbolmap=foo is the
+ // same as wasm-as --symbolmap=foo even though the latter is not a pass
+ // (wasm-as cannot run arbitrary passes).
+ // TODO: switch emscripten to this name, then remove the old one
+ registerPass(
+ "symbolmap", "(alias for print-function-map)", createPrintFunctionMapPass);
+
registerPass("print-stack-ir",
"print out Stack IR (useful for internal debugging)",
createPrintStackIRPass);