mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -8,9 +8,15 @@
|
||||
#include "llvm/Support/FormatVariadic.h"
|
||||
#include "toolchain/lexer/tokenized_buffer.h"
|
||||
#include "toolchain/semantics/semantics_node.h"
|
||||
#include "toolchain/semantics/semantics_parse_tree_handler.h"
|
||||
|
||||
namespace Carbon {
|
||||
|
||||
SemanticsIR::SemanticsIR(const TokenizedBuffer& tokens,
|
||||
const ParseTree& parse_tree) {
|
||||
SemanticsParseTreeHandler(tokens, parse_tree, *this).Build();
|
||||
}
|
||||
|
||||
auto SemanticsIR::Print(llvm::raw_ostream& out) const -> void {
|
||||
out << "identifiers = {\n";
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(identifiers_.size()); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user