mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add more value store types to File. (#3317)
Finishing what #3316 started, add more bespoke ValueStore-like structures to File. With this, the things which previously had somewhat boilerplate Add/Get functions are now all on side classes, giving a uniform style of API for calling. Note, I was on the fence about making things public on ValueStore. If it's preferred that I make some things there protected I certainly can, there's just a trade-off that may mean more distinct child/wrapper types.
This commit is contained in:
@@ -38,8 +38,8 @@ auto FunctionContext::TryToReuseBlock(SemIR::NodeBlockId block_id,
|
||||
}
|
||||
|
||||
auto FunctionContext::LowerBlock(SemIR::NodeBlockId block_id) -> void {
|
||||
for (const auto& node_id : semantics_ir().GetNodeBlock(block_id)) {
|
||||
auto node = semantics_ir().GetNode(node_id);
|
||||
for (const auto& node_id : semantics_ir().node_blocks().Get(block_id)) {
|
||||
auto node = semantics_ir().nodes().Get(node_id);
|
||||
CARBON_VLOG() << "Lowering " << node_id << ": " << node << "\n";
|
||||
// clang warns on unhandled enum values; clang-tidy is incorrect here.
|
||||
// NOLINTNEXTLINE(bugprone-switch-missing-default-case)
|
||||
|
||||
Reference in New Issue
Block a user