Refactory the IR/builder relationship (#2342)

I'm thinking about how to handle multiple files, and I think the current IRFactory is useful as a file-focused thing. So shifting/renaming accordingly. (doing this in its own PR to make the history a little cleaner for git's move detection)
This commit is contained in:
Jon Ross-Perkins
2022-10-25 12:55:26 -07:00
committed by GitHub
parent 5c3f48b0fb
commit d51ca271af
10 changed files with 67 additions and 80 deletions
+2 -2
View File
@@ -14,7 +14,7 @@
#include "toolchain/diagnostics/sorting_diagnostic_consumer.h"
#include "toolchain/lexer/tokenized_buffer.h"
#include "toolchain/parser/parse_tree.h"
#include "toolchain/semantics/semantics_ir_factory.h"
#include "toolchain/semantics/semantics_ir.h"
#include "toolchain/source/source_buffer.h"
namespace Carbon {
@@ -162,7 +162,7 @@ auto Driver::RunDumpSubcommand(DiagnosticConsumer& consumer,
return !tokenized_source.has_errors() && !parse_tree.has_errors();
}
auto semantics_ir = SemanticsIRFactory::Build(tokenized_source, parse_tree);
SemanticsIR semantics_ir(tokenized_source, parse_tree);
if (dump_mode == DumpMode::SemanticsIR) {
consumer.Flush();
semantics_ir.Print(output_stream_);