Skip to content

Commit

Permalink
Rollup merge of #56597 - vext01:dump-mir-usage, r=wesleywiser
Browse files Browse the repository at this point in the history
Improve the usage message for `-Z dump-mir`.

Ouput now looks like this:
```
$ rustc -Z help
...
    -Z               arg-align-attributes -- emit align metadata for reference arguments
    -Z                       dump-mir=val -- dump MIR state to file.
        `val` is used to select which passes and functions to dump. For example:
        `all` matches all passes and functions,
        `foo` matches all passes for functions whose name contains 'foo',
        `foo & ConstProp` only the 'ConstProp' pass for function names containing 'foo',
        `foo | bar` all passes for function names containing 'foo' or 'bar'.
    -Z                   dump-mir-dir=val -- the directory the MIR is dumped into
...
```

Fixes #56558
  • Loading branch information
Centril authored Dec 8, 2018
2 parents ac15b4f + 5f9f05d commit 253c448
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,13 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
arg_align_attributes: bool = (false, parse_bool, [TRACKED],
"emit align metadata for reference arguments"),
dump_mir: Option<String> = (None, parse_opt_string, [UNTRACKED],
"dump MIR state at various points in transforms"),
"dump MIR state to file.
`val` is used to select which passes and functions to dump. For example:
`all` matches all passes and functions,
`foo` matches all passes for functions whose name contains 'foo',
`foo & ConstProp` only the 'ConstProp' pass for function names containing 'foo',
`foo | bar` all passes for function names containing 'foo' or 'bar'."),

dump_mir_dir: String = (String::from("mir_dump"), parse_string, [UNTRACKED],
"the directory the MIR is dumped into"),
dump_mir_graphviz: bool = (false, parse_bool, [UNTRACKED],
Expand Down

0 comments on commit 253c448

Please sign in to comment.