authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-03-22 14:04:17+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-03-22 14:04:17+01:00
log541e3a03ec773c0f0c63f25d6c51c95d2aeb637f
tree9bdf2a4e8eea61792c68ebffd6e0385e2cfa68f1
parent5cd7fef17faa2a40c8da23f0ef2485df0af39ed4

lib/std/coff: allow for unhandled enum values


1 files changed, 19 insertions(+), 0 deletions(-)

lib/std/coff.zig+19
...@@ -175,6 +175,8 @@ pub const Subsystem = enum(u16) {...@@ -175,6 +175,8 @@ pub const Subsystem = enum(u16) {
175175
176 /// Windows boot application176 /// Windows boot application
177 WINDOWS_BOOT_APPLICATION = 16,177 WINDOWS_BOOT_APPLICATION = 16,
178
179 _,
178};180};
179181
180pub const OptionalHeader = extern struct {182pub const OptionalHeader = extern struct {
...@@ -300,6 +302,8 @@ pub const DirectoryEntry = enum(u16) {...@@ -300,6 +302,8 @@ pub const DirectoryEntry = enum(u16) {
300302
301 /// COM Runtime descriptor303 /// COM Runtime descriptor
302 COM_DESCRIPTOR = 14,304 COM_DESCRIPTOR = 14,
305
306 _,
303};307};
304308
305pub const ImageDataDirectory = extern struct {309pub const ImageDataDirectory = extern struct {
...@@ -383,6 +387,8 @@ pub const BaseRelocationType = enum(u4) {...@@ -383,6 +387,8 @@ pub const BaseRelocationType = enum(u4) {
383387
384 /// The base relocation applies the difference to the 64-bit field at offset.388 /// The base relocation applies the difference to the 64-bit field at offset.
385 DIR64 = 10,389 DIR64 = 10,
390
391 _,
386};392};
387393
388pub const DebugDirectoryEntry = extern struct {394pub const DebugDirectoryEntry = extern struct {
...@@ -414,6 +420,8 @@ pub const DebugType = enum(u32) {...@@ -414,6 +420,8 @@ pub const DebugType = enum(u32) {
414 MPX = 15,420 MPX = 15,
415 REPRO = 16,421 REPRO = 16,
416 EX_DLLCHARACTERISTICS = 20,422 EX_DLLCHARACTERISTICS = 20,
423
424 _,
417};425};
418426
419pub const ImportDirectoryEntry = extern struct {427pub const ImportDirectoryEntry = extern struct {
...@@ -736,6 +744,8 @@ pub const BaseType = enum(u8) {...@@ -736,6 +744,8 @@ pub const BaseType = enum(u8) {
736744
737 /// An unsigned 4-byte integer745 /// An unsigned 4-byte integer
738 DWORD = 15,746 DWORD = 15,
747
748 _,
739};749};
740750
741pub const ComplexType = enum(u8) {751pub const ComplexType = enum(u8) {
...@@ -750,6 +760,8 @@ pub const ComplexType = enum(u8) {...@@ -750,6 +760,8 @@ pub const ComplexType = enum(u8) {
750760
751 /// The symbol is an array of base type.761 /// The symbol is an array of base type.
752 ARRAY = 48,762 ARRAY = 48,
763
764 _,
753};765};
754766
755pub const StorageClass = enum(u8) {767pub const StorageClass = enum(u8) {
...@@ -843,6 +855,8 @@ pub const StorageClass = enum(u8) {...@@ -843,6 +855,8 @@ pub const StorageClass = enum(u8) {
843 /// A CLR token symbol. The name is an ASCII string that consists of the hexadecimal value of the token.855 /// A CLR token symbol. The name is an ASCII string that consists of the hexadecimal value of the token.
844 /// For more information, see CLR Token Definition (Object Only).856 /// For more information, see CLR Token Definition (Object Only).
845 CLR_TOKEN = 107,857 CLR_TOKEN = 107,
858
859 _,
846};860};
847861
848pub const FunctionDefinition = struct {862pub const FunctionDefinition = struct {
...@@ -915,6 +929,7 @@ pub const WeakExternalFlag = enum(u32) {...@@ -915,6 +929,7 @@ pub const WeakExternalFlag = enum(u32) {
915 SEARCH_LIBRARY = 2,929 SEARCH_LIBRARY = 2,
916 SEARCH_ALIAS = 3,930 SEARCH_ALIAS = 3,
917 ANTI_DEPENDENCY = 4,931 ANTI_DEPENDENCY = 4,
932 _,
918};933};
919934
920pub const ComdatSelection = enum(u8) {935pub const ComdatSelection = enum(u8) {
...@@ -947,6 +962,8 @@ pub const ComdatSelection = enum(u8) {...@@ -947,6 +962,8 @@ pub const ComdatSelection = enum(u8) {
947 /// The linker chooses the largest definition from among all of the definitions for this symbol.962 /// The linker chooses the largest definition from among all of the definitions for this symbol.
948 /// If multiple definitions have this size, the choice between them is arbitrary.963 /// If multiple definitions have this size, the choice between them is arbitrary.
949 LARGEST = 6,964 LARGEST = 6,
965
966 _,
950};967};
951968
952pub const DebugInfoDefinition = struct {969pub const DebugInfoDefinition = struct {
...@@ -1016,6 +1033,8 @@ pub const MachineType = enum(u16) {...@@ -1016,6 +1033,8 @@ pub const MachineType = enum(u16) {
1016 /// MIPS little-endian WCE v21033 /// MIPS little-endian WCE v2
1017 WCEMIPSV2 = 0x169,1034 WCEMIPSV2 = 0x169,
10181035
1036 _,
1037
1019 pub fn fromTargetCpuArch(arch: std.Target.Cpu.Arch) MachineType {1038 pub fn fromTargetCpuArch(arch: std.Target.Cpu.Arch) MachineType {
1020 return switch (arch) {1039 return switch (arch) {
1021 .arm => .ARM,1040 .arm => .ARM,