aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2021-12-16 01:45:41 +0100
committerRobin Voetter <robin@voetter.nl>2021-12-21 01:41:50 +0100
commitcd733ceb852369427301fbb526b82ad4407d0607 (patch)
tree9673ab520b07e73650be9038b7db62c628795e42 /src/Module.zig
parentea913846c2d45a6e4862d5eaf94773ea880bfeab (diff)
downloadzig-cd733ceb852369427301fbb526b82ad4407d0607.tar.gz
zig-cd733ceb852369427301fbb526b82ad4407d0607.zip
stage2: replace ErrorSet and ErrorSetMerged arrays with hash maps
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 341b6bb56e..8341c3de60 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -796,15 +796,11 @@ pub const ErrorSet = struct {
owner_decl: *Decl,
/// Offset from Decl node index, points to the error set AST node.
node_offset: i32,
- names_len: u32,
/// The string bytes are stored in the owner Decl arena.
/// They are in the same order they appear in the AST.
- /// The length is given by `names_len`.
- names_ptr: [*]const []const u8,
+ names: NameMap,
- pub fn names(self: ErrorSet) []const []const u8 {
- return self.names_ptr[0..self.names_len];
- }
+ pub const NameMap = std.StringArrayHashMapUnmanaged(void);
pub fn srcLoc(self: ErrorSet) SrcLoc {
return .{