Add formatter support for dump-sem-ir ranges (#5379)

This prints instructions that are inside the range, and entities that
overlap with the range. Note this can lead to incomplete printing of
entity contents.
This commit is contained in:
Jon Ross-Perkins
2025-04-29 22:18:52 +00:00
committed by GitHub
parent 13da710e94
commit 8eae40646a
6 changed files with 305 additions and 29 deletions
+2 -1
View File
@@ -568,7 +568,8 @@ auto CompilationUnit::PostCheck() -> void {
return IncludeInDumps(import_ir->filename());
};
SemIR::Formatter formatter(&*sem_ir_, should_format_entity);
SemIR::Formatter formatter(&*sem_ir_, should_format_entity,
*tree_and_subtrees_getter_);
formatter.Format();
if (vlog_stream_) {
CARBON_VLOG("*** SemIR::File ***\n");