authorgravatar for evan@lagerdata.comEvan Haas <evan@lagerdata.com> 2021-08-31 20:16:37-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-09-01 17:54:07-07:00
logbbf4c25e2dbe1dc2f165d8c978e5a5ed39be2cfc
tree3103c5ecda2a1ea6f32dfb05ca70b8301692978d
parentc0e84e3ee0f6aea0537d83f141cb17522d5e3a1b

translate-c: rename import_builtin to import_c_builtin


2 files changed, 6 insertions(+), 6 deletions(-)

src/translate_c.zig+1-1
...@@ -399,7 +399,7 @@ pub fn translate(...@@ -399,7 +399,7 @@ pub fn translate(
399 if (decl.is_pub) {399 if (decl.is_pub) {
400 const builtin = try Tag.pub_var_simple.create(context.arena, .{400 const builtin = try Tag.pub_var_simple.create(context.arena, .{
401 .name = decl.name,401 .name = decl.name,
402 .init = try Tag.import_builtin.create(context.arena, decl.name),402 .init = try Tag.import_c_builtin.create(context.arena, decl.name),
403 });403 });
404 try addTopLevelDecl(&context, decl.name, builtin);404 try addTopLevelDecl(&context, decl.name, builtin);
405 }405 }
src/translate_c/ast.zig+5-5
...@@ -118,7 +118,7 @@ pub const Node = extern union {...@@ -118,7 +118,7 @@ pub const Node = extern union {
118 assign,118 assign,
119119
120 /// @import("std").zig.c_builtins.<name>120 /// @import("std").zig.c_builtins.<name>
121 import_builtin,121 import_c_builtin,
122 log2_int_type,122 log2_int_type,
123 /// @import("std").math.Log2Int(operand)123 /// @import("std").math.Log2Int(operand)
124 std_math_Log2Int,124 std_math_Log2Int,
...@@ -343,7 +343,7 @@ pub const Node = extern union {...@@ -343,7 +343,7 @@ pub const Node = extern union {
343 .warning,343 .warning,
344 .type,344 .type,
345 .helpers_macro,345 .helpers_macro,
346 .import_builtin,346 .import_c_builtin,
347 => Payload.Value,347 => Payload.Value,
348 .discard => Payload.Discard,348 .discard => Payload.Discard,
349 .@"if" => Payload.If,349 .@"if" => Payload.If,
...@@ -1127,8 +1127,8 @@ fn renderNode(c: *Context, node: Node) Allocator.Error!NodeIndex {...@@ -1127,8 +1127,8 @@ fn renderNode(c: *Context, node: Node) Allocator.Error!NodeIndex {
1127 };1127 };
1128 return renderStdImport(c, &chain);1128 return renderStdImport(c, &chain);
1129 },1129 },
1130 .import_builtin => {1130 .import_c_builtin => {
1131 const payload = node.castTag(.import_builtin).?.data;1131 const payload = node.castTag(.import_c_builtin).?.data;
1132 const chain = [_][]const u8{1132 const chain = [_][]const u8{
1133 "zig",1133 "zig",
1134 "c_builtins",1134 "c_builtins",
...@@ -2363,7 +2363,7 @@ fn renderNodeGrouped(c: *Context, node: Node) !NodeIndex {...@@ -2363,7 +2363,7 @@ fn renderNodeGrouped(c: *Context, node: Node) !NodeIndex {
2363 .bit_xor_assign,2363 .bit_xor_assign,
2364 .assign,2364 .assign,
2365 .helpers_macro,2365 .helpers_macro,
2366 .import_builtin,2366 .import_c_builtin,
2367 => {2367 => {
2368 // these should never appear in places where grouping might be needed.2368 // these should never appear in places where grouping might be needed.
2369 unreachable;2369 unreachable;