mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 10:11:04 +01:00
Add a convenience method for dumping the formatted SemIR file. (#4123)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "toolchain/parse/node_kind.h"
|
||||
#include "toolchain/sem_ir/builtin_inst_kind.h"
|
||||
#include "toolchain/sem_ir/file.h"
|
||||
#include "toolchain/sem_ir/formatter.h"
|
||||
#include "toolchain/sem_ir/ids.h"
|
||||
#include "toolchain/sem_ir/import_ir.h"
|
||||
#include "toolchain/sem_ir/inst.h"
|
||||
@@ -1197,4 +1198,8 @@ auto Context::PrintForStackDump(llvm::raw_ostream& output) const -> void {
|
||||
args_type_info_stack_.PrintForStackDump(output);
|
||||
}
|
||||
|
||||
auto Context::DumpFormattedFile() const -> void {
|
||||
FormatFile(*tokens_, *parse_tree_, *sem_ir_, llvm::errs());
|
||||
}
|
||||
|
||||
} // namespace Carbon::Check
|
||||
|
||||
Reference in New Issue
Block a user