mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 16:01:05 +01:00
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:
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user