Rename semantics to semantics_ir (#2858)

This is a rename of a commonly used accessor. I tend to prefer shorter names, but it's semantics_ir in LoweringContext, and it feels odder to shorten to semantics there than to lengthen to semantics_ir here. I already have builtins_ir around here, too. I think it's helpful to use consistent names for semantics_ir since they're dealing with essentially the same thing.
This commit is contained in:
Jon Ross-Perkins
2023-06-01 14:32:22 -07:00
committed by GitHub
parent 81e53886a8
commit dce67e4062
7 changed files with 86 additions and 81 deletions
@@ -53,10 +53,10 @@ auto SemanticsHandleStructFieldValue(SemanticsContext& context,
// Store the name for the type.
auto type_block_id = context.args_type_info_stack().PeekForAdd();
context.semantics().AddNode(
context.semantics_ir().AddNode(
type_block_id,
SemanticsNode::StructTypeField::Make(
parse_node, context.semantics().GetNode(value_node_id).type_id(),
parse_node, context.semantics_ir().GetNode(value_node_id).type_id(),
name_id));
// Push the value back on the stack as an argument.
@@ -109,7 +109,8 @@ auto SemanticsHandleStructTypeLiteral(SemanticsContext& context,
<< "{} is handled by StructLiteral.";
auto type_id = context.CanonicalizeStructType(parse_node, refs_id);
context.node_stack().Push(parse_node, context.semantics().GetType(type_id));
context.node_stack().Push(parse_node,
context.semantics_ir().GetType(type_id));
return true;
}