aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-07-12 12:40:32 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-07-12 12:40:32 -0700
commit28dd9d478d24190ab5c8c4b892d7dfc16c380ae0 (patch)
treef717633b02bdd9cf1c7bc724908e8d19ef097981 /src/codegen/c.zig
parent03156e589939993bba339162d27d24fd511601c6 (diff)
downloadzig-28dd9d478d24190ab5c8c4b892d7dfc16c380ae0.tar.gz
zig-28dd9d478d24190ab5c8c4b892d7dfc16c380ae0.zip
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.
Diffstat (limited to 'src/codegen/c.zig')
-rw-r--r--src/codegen/c.zig6
1 files changed, 3 insertions, 3 deletions
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(