diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-11 08:49:24 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-13 06:34:55 +1100 |
| commit | 7d145a0fde3771662648df2de63e8f64033bf598 (patch) | |
| tree | cde63d5fc5a9991aa12bb3c5de11b9aaeb3ed498 /compiler/rustc_codegen_llvm/src | |
| parent | e3d8bbbfe29ab73afe1d258d6f69c2d6840a30ff (diff) | |
| download | rust-7d145a0fde3771662648df2de63e8f64033bf598.tar.gz rust-7d145a0fde3771662648df2de63e8f64033bf598.zip | |
Merge `print_*` functions.
The handling of the `PpMode` variants is currently spread across three functions: `print_after_parsing`, `print_after_hir_lowering`, and `print_with_analysis`. Each one handles some of the variants. This split is primarily because `print_after_parsing` has slightly different arguments to the other two. This commit changes the structure. It merges the three functions into a single `print` function, and encapsulates the different arguments in a new enum `PrintExtra`. Benefits: - The code is a little shorter. - All the `PpMode` variants are handled in a single `match`, with no need for `unreachable!` arms. - It enables the trait removal in the subsequent commit by reducing the number of `call_with_pp_support_ast` call sites from two to one.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
