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 authored and GitHub committed 2025-04-29 22:18:52 +00:00
1 parent 13da710e94
commit 8eae40646a
6 files changed
+305 -29

No files matched your search

+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");