Commit bbf4c25e2d

Evan Haas <evan@lagerdata.com>
2021-09-01 05:16:37
translate-c: rename import_builtin to import_c_builtin
1 parent c0e84e3
Changed files (2)
src
src/translate_c/ast.zig
@@ -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;
src/translate_c.zig
@@ -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);
         }