| ... | ... | @@ -4195,8 +4195,11 @@ fn maybeSuppressResult(c: *Context, used: ResultUsed, result: Node) TransError!N |
| 4195 | 4195 | } |
| 4196 | 4196 | |
| 4197 | 4197 | fn addTopLevelDecl(c: *Context, name: []const u8, decl_node: Node) !void { |
| 4198 | | try c.global_scope.sym_table.put(name, decl_node); |
| 4199 | | try c.global_scope.nodes.append(decl_node); |
| 4198 | const gop = try c.global_scope.sym_table.getOrPut(name); |
| 4199 | if (!gop.found_existing) { |
| 4200 | gop.value_ptr.* = decl_node; |
| 4201 | try c.global_scope.nodes.append(decl_node); |
| 4202 | } |
| 4200 | 4203 | } |
| 4201 | 4204 | |
| 4202 | 4205 | fn transQualTypeInitializedStringLiteral(c: *Context, elem_ty: Node, string_lit: *const clang.StringLiteral) TypeError!Node { |