Skip to content
/ zig Public
forked from ziglang/zig

Commit

Permalink
std.coff: Capitalize MachineType.{Unknown,Thumb} for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Aug 13, 2024
1 parent 8d7a7e1 commit 94e74f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/std/Target.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ pub const Cpu = struct {
pub fn toCoffMachine(arch: Arch) std.coff.MachineType {
return switch (arch) {
.arm => .ARM,
.thumb => .Thumb,
.thumb => .THUMB,
.aarch64 => .ARM64,
.loongarch32 => .LOONGARCH32,
.loongarch64 => .LOONGARCH64,
Expand Down Expand Up @@ -1299,7 +1299,7 @@ pub const Cpu = struct {
.wasm64,
.xcore,
.xtensa,
=> .Unknown,
=> .UNKNOWN,
};
}

Expand Down
6 changes: 3 additions & 3 deletions lib/std/coff.zig
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ pub const DebugInfoDefinition = struct {
};

pub const MachineType = enum(u16) {
Unknown = 0x0,
UNKNOWN = 0x0,
/// Alpha AXP, 32-bit address space
ALPHA = 0x184,
/// Alpha 64, 64-bit address space
Expand Down Expand Up @@ -1053,7 +1053,7 @@ pub const MachineType = enum(u16) {
/// Hitachi SH5
SH5 = 0x1a8,
/// Thumb
Thumb = 0x1c2,
THUMB = 0x1c2,
/// Infineon
TRICORE = 0x520,
/// MIPS little-endian WCE v2
Expand All @@ -1066,7 +1066,7 @@ pub const MachineType = enum(u16) {
.ARM => .arm,
.POWERPC => .powerpc,
.RISCV32 => .riscv32,
.Thumb => .thumb,
.THUMB => .thumb,
.I386 => .x86,
.ARM64 => .aarch64,
.RISCV64 => .riscv64,
Expand Down

0 comments on commit 94e74f7

Please sign in to comment.