| ... | @@ -1515,13 +1515,7 @@ pub const LazyPath = union(@This().Tag) { | ... | @@ -1515,13 +1515,7 @@ pub const LazyPath = union(@This().Tag) { |
| 1515 | }; | 1515 | }; |
| 1516 | | 1516 | |
| 1517 | /// An index into `extra`. | 1517 | /// An index into `extra`. |
| 1518 | pub const Index = enum(u32) { | 1518 | pub const Index = IndexType(@This()); |
| 1519 | _, | | |
| 1520 | | | |
| 1521 | pub fn get(this: @This(), c: *const Configuration) LazyPath { | | |
| 1522 | return extraData(c, LazyPath, @backingInt(this)); | | |
| 1523 | } | | |
| 1524 | }; | | |
| 1525 | | 1519 | |
| 1526 | /// An index into `extra`, or `null`. | 1520 | /// An index into `extra`, or `null`. |
| 1527 | pub const OptionalIndex = enum(u32) { | 1521 | pub const OptionalIndex = enum(u32) { |
| ... | @@ -1746,13 +1740,7 @@ pub const Module = struct { | ... | @@ -1746,13 +1740,7 @@ pub const Module = struct { |
| 1746 | } | 1740 | } |
| 1747 | }; | 1741 | }; |
| 1748 | | 1742 | |
| 1749 | pub const Index = enum(u32) { | 1743 | pub const Index = IndexType(@This()); |
| 1750 | _, | | |
| 1751 | | | |
| 1752 | pub fn get(this: @This(), c: *const Configuration) Module { | | |
| 1753 | return extraData(c, Module, @backingInt(this)); | | |
| 1754 | } | | |
| 1755 | }; | | |
| 1756 | | 1744 | |
| 1757 | pub const Flags = packed struct(u32) { | 1745 | pub const Flags = packed struct(u32) { |
| 1758 | optimize: Optimize, | 1746 | optimize: Optimize, |
| ... | @@ -2051,13 +2039,7 @@ pub const SystemLib = struct { | ... | @@ -2051,13 +2039,7 @@ pub const SystemLib = struct { |
| 2051 | name: String, | 2039 | name: String, |
| 2052 | flags: Flags, | 2040 | flags: Flags, |
| 2053 | | 2041 | |
| 2054 | pub const Index = enum(u32) { | 2042 | pub const Index = IndexType(@This()); |
| 2055 | _, | | |
| 2056 | | | |
| 2057 | pub fn get(this: @This(), c: *const Configuration) SystemLib { | | |
| 2058 | return extraData(c, SystemLib, @backingInt(this)); | | |
| 2059 | } | | |
| 2060 | }; | | |
| 2061 | | 2043 | |
| 2062 | pub const UsePkgConfig = enum(u2) { | 2044 | pub const UsePkgConfig = enum(u2) { |
| 2063 | /// Don't use pkg-config, just pass -lfoo where foo is name. | 2045 | /// Don't use pkg-config, just pass -lfoo where foo is name. |
| ... | @@ -2090,13 +2072,7 @@ pub const CSourceFiles = struct { | ... | @@ -2090,13 +2072,7 @@ pub const CSourceFiles = struct { |
| 2090 | args: Storage.FlagList(.flags, .args_len, String), | 2072 | args: Storage.FlagList(.flags, .args_len, String), |
| 2091 | sub_paths: Storage.LengthPrefixedList(String), | 2073 | sub_paths: Storage.LengthPrefixedList(String), |
| 2092 | | 2074 | |
| 2093 | pub const Index = enum(u32) { | 2075 | pub const Index = IndexType(@This()); |
| 2094 | _, | | |
| 2095 | | | |
| 2096 | pub fn get(this: @This(), c: *const Configuration) CSourceFiles { | | |
| 2097 | return extraData(c, CSourceFiles, @backingInt(this)); | | |
| 2098 | } | | |
| 2099 | }; | | |
| 2100 | | 2076 | |
| 2101 | pub const Flags = packed struct(u32) { | 2077 | pub const Flags = packed struct(u32) { |
| 2102 | /// C compiler CLI flags. | 2078 | /// C compiler CLI flags. |
| ... | @@ -2110,13 +2086,7 @@ pub const CSourceFile = struct { | ... | @@ -2110,13 +2086,7 @@ pub const CSourceFile = struct { |
| 2110 | file: LazyPath.Index, | 2086 | file: LazyPath.Index, |
| 2111 | args: Storage.FlagList(.flags, .args_len, String), | 2087 | args: Storage.FlagList(.flags, .args_len, String), |
| 2112 | | 2088 | |
| 2113 | pub const Index = enum(u32) { | 2089 | pub const Index = IndexType(@This()); |
| 2114 | _, | | |
| 2115 | | | |
| 2116 | pub fn get(this: @This(), c: *const Configuration) CSourceFile { | | |
| 2117 | return extraData(c, CSourceFile, @backingInt(this)); | | |
| 2118 | } | | |
| 2119 | }; | | |
| 2120 | | 2090 | |
| 2121 | pub const Flags = packed struct(u32) { | 2091 | pub const Flags = packed struct(u32) { |
| 2122 | /// C compiler CLI flags. | 2092 | /// C compiler CLI flags. |
| ... | @@ -2131,13 +2101,7 @@ pub const RcSourceFile = struct { | ... | @@ -2131,13 +2101,7 @@ pub const RcSourceFile = struct { |
| 2131 | args: Storage.FlagList(.flags, .args_len, String), | 2101 | args: Storage.FlagList(.flags, .args_len, String), |
| 2132 | include_paths: Storage.FlagLengthPrefixedList(.flags, .include_paths, LazyPath.Index), | 2102 | include_paths: Storage.FlagLengthPrefixedList(.flags, .include_paths, LazyPath.Index), |
| 2133 | | 2103 | |
| 2134 | pub const Index = enum(u32) { | 2104 | pub const Index = IndexType(@This()); |
| 2135 | _, | | |
| 2136 | | | |
| 2137 | pub fn get(this: @This(), c: *const Configuration) RcSourceFile { | | |
| 2138 | return extraData(c, RcSourceFile, @backingInt(this)); | | |
| 2139 | } | | |
| 2140 | }; | | |
| 2141 | | 2105 | |
| 2142 | pub const Flags = packed struct(u32) { | 2106 | pub const Flags = packed struct(u32) { |
| 2143 | /// C compiler CLI flags. | 2107 | /// C compiler CLI flags. |
| ... | @@ -2176,13 +2140,7 @@ pub const ResolvedTarget = struct { | ... | @@ -2176,13 +2140,7 @@ pub const ResolvedTarget = struct { |
| 2176 | /// defaults will be resolved. | 2140 | /// defaults will be resolved. |
| 2177 | result: TargetQuery.Index, | 2141 | result: TargetQuery.Index, |
| 2178 | | 2142 | |
| 2179 | pub const Index = enum(u32) { | 2143 | pub const Index = IndexType(@This()); |
| 2180 | _, | | |
| 2181 | | | |
| 2182 | pub fn get(this: @This(), c: *const Configuration) ResolvedTarget { | | |
| 2183 | return extraData(c, ResolvedTarget, @backingInt(this)); | | |
| 2184 | } | | |
| 2185 | }; | | |
| 2186 | | 2144 | |
| 2187 | pub const OptionalIndex = enum(u32) { | 2145 | pub const OptionalIndex = enum(u32) { |
| 2188 | none = max_u32, | 2146 | none = max_u32, |