translate-c: rename import_builtin to import_c_builtin

This commit is contained in:
Evan Haas authored and Andrew Kelley committed 2021-09-01 17:54:07 -07:00
1 parent c0e84e3ee0
commit bbf4c25e2d
2 files changed
+6 -6

No files matched your search

+1 -1
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);
}
+5 -5
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;