translate-c: rename import_builtin to import_c_builtin

This commit is contained in:
Evan Haas 2021-08-31 20:16:37 -07:00 committed by Andrew Kelley
parent c0e84e3ee0
commit bbf4c25e2d
2 changed files with 6 additions and 6 deletions

View File

@ -399,7 +399,7 @@ pub fn translate(
if (decl.is_pub) {
const builtin = try Tag.pub_var_simple.create(context.arena, .{
.name = decl.name,
.init = try Tag.import_builtin.create(context.arena, decl.name),
.init = try Tag.import_c_builtin.create(context.arena, decl.name),
});
try addTopLevelDecl(&context, decl.name, builtin);
}

View File

@ -118,7 +118,7 @@ pub const Node = extern union {
assign,
/// @import("std").zig.c_builtins.<name>
import_builtin,
import_c_builtin,
log2_int_type,
/// @import("std").math.Log2Int(operand)
std_math_Log2Int,
@ -343,7 +343,7 @@ pub const Node = extern union {
.warning,
.type,
.helpers_macro,
.import_builtin,
.import_c_builtin,
=> Payload.Value,
.discard => Payload.Discard,
.@"if" => Payload.If,
@ -1127,8 +1127,8 @@ fn renderNode(c: *Context, node: Node) Allocator.Error!NodeIndex {
};
return renderStdImport(c, &chain);
},
.import_builtin => {
const payload = node.castTag(.import_builtin).?.data;
.import_c_builtin => {
const payload = node.castTag(.import_c_builtin).?.data;
const chain = [_][]const u8{
"zig",
"c_builtins",
@ -2363,7 +2363,7 @@ fn renderNodeGrouped(c: *Context, node: Node) !NodeIndex {
.bit_xor_assign,
.assign,
.helpers_macro,
.import_builtin,
.import_c_builtin,
=> {
// these should never appear in places where grouping might be needed.
unreachable;