Skip to content

Commit a333663

Browse files
Error if conflicting options are passed.
Signed-off-by: Tomas Fabrizio Orsi <[email protected]>
1 parent 09aa5af commit a333663

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hir/src/pass/manager.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ impl TryFrom<&Options> for IRPrintingConfig {
5151
.iter()
5252
.map(|a| a.try_into())
5353
.collect::<Result<Vec<PassIdentifier>, Report>>()?;
54+
if options.print_ir_after_all && !pass_filters.is_empty() {
55+
return Err(Report::msg(
56+
"print_ir_after_all and print_ir_after_pass flags are mutually exclusivke"
57+
.to_string(),
58+
));
59+
};
5460
Ok(IRPrintingConfig {
5561
print_ir_after_all: options.print_ir_after_all,
5662
print_ir_after_pass: pass_filters,

0 commit comments

Comments
 (0)