aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 19:06:03 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 19:06:03 +0800
commit86caf2db80050b857fac77269708263a1826c5a2 (patch)
tree6915b8b153125065f73efa00fd659f08e09bfecc
parent1ef9d699d3160a9f79e89f423352fbb8d43e70d7 (diff)
downloadrcc-project-86caf2db80050b857fac77269708263a1826c5a2.tar.gz
rcc-project-86caf2db80050b857fac77269708263a1826c5a2.tar.xz
[MIRTool] Read stdin when no input path is given
-rw-r--r--backend/tools/MIRTool/MIRToolMain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/tools/MIRTool/MIRToolMain.cpp b/backend/tools/MIRTool/MIRToolMain.cpp
index d675f35..500eeb2 100644
--- a/backend/tools/MIRTool/MIRToolMain.cpp
+++ b/backend/tools/MIRTool/MIRToolMain.cpp
@@ -74,7 +74,7 @@ struct CommandLine final {
};
void printUsage(std::ostream &Output) {
- Output << "usage: rcc-backend-mir [operation] [options] <input.mir|->\n"
+ Output << "usage: rcc-backend-mir [operation] [options] [input.mir|-]\n"
"operations:\n"
" --verify Parse, canonicalize, and verify MIR\n"
" --reproduce <package> Strictly replay a reproducer package\n"
@@ -656,7 +656,7 @@ void applyFeatureOverrides(std::vector<std::string> Overrides, std::vector<std::
return rcc::makeUnexpected(ErrorCode::InvalidInvocation,
"reproducer replay does not accept a separate MIR input");
} else if (Command.InputPath.empty()) {
- return rcc::makeUnexpected(ErrorCode::InvalidInvocation, "a MIR input path is required");
+ Command.InputPath = "-";
}
if (Command.Cache != CachePolicy::Off && Command.CachePath.empty()) {
return rcc::makeUnexpected(ErrorCode::InvalidInvocation,