Add a feature to explicitly include a file's SemIR (#5961)

Trying to figure out an easy way to debug semir in the prelude, #5703
removed an option to set `--exclude-dump-file-prefix` to empty. But,
this is probably an improvement over that flow... With this change, it's
possible to add `//@dump-sem-ir-file` to a specific prelude file, and
its full IR will be printed. Additionally, it becomes an option with the
default `--dump-sem-ir-ranges=only` to add `//@dump-sem-ir-file` and get
the full file's IR.
This commit is contained in:
Jon Ross-Perkins
2025-08-15 18:53:43 +00:00
committed by GitHub
parent 3f9fc633fe
commit 8d08e774fc
11 changed files with 484 additions and 10 deletions
+4
View File
@@ -236,6 +236,10 @@ auto TokenizedBuffer::Print(llvm::raw_ostream& output_stream,
output_stream << "\n";
}
if (has_include_in_dumps_) {
output_stream << " has_include_in_dumps: true\n";
}
if (!dump_sem_ir_ranges_.empty()) {
output_stream << " dump_sem_ir_ranges:\n";
for (auto range : dump_sem_ir_ranges_) {