From 28dd9d478d24190ab5c8c4b892d7dfc16c380ae0 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 12 Jul 2021 12:40:32 -0700 Subject: C backend: TypedefMap is now ArrayHashMap The C backend depends on insertion order into this map so that type definitions will be declared before they are used. --- src/codegen/c.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/codegen/c.zig') diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 31c7fa76d3..391375c709 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -39,11 +39,11 @@ const BlockData = struct { }; pub const CValueMap = std.AutoHashMap(*Inst, CValue); -pub const TypedefMap = std.HashMap( +pub const TypedefMap = std.ArrayHashMap( Type, struct { name: []const u8, rendered: []u8 }, - Type.HashContext, - std.hash_map.default_max_load_percentage, + Type.HashContext32, + true, ); fn formatTypeAsCIdentifier( -- cgit v1.2.3