aboutsummaryrefslogtreecommitdiff
path: root/lib/std/macho.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-04-22 18:07:46 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-04-22 18:07:46 -0700
commit507a8096d2f9624bafaf963c3e189a477ef6b7bf (patch)
treec21e3d54e1389fe44ecc7d5f230e792e26ab322d /lib/std/macho.zig
parent7c453b91b85bab6800d24feb57c4f35b8ce48d57 (diff)
downloadzig-507a8096d2f9624bafaf963c3e189a477ef6b7bf.tar.gz
zig-507a8096d2f9624bafaf963c3e189a477ef6b7bf.zip
std: fix compile errors caught by stage2 AstGen
* `comptime const` is redundant * don't use `extern enum`; specify a tag type. `extern enum` is only when you need tags to alias. But aliasing tags is a smell. I will be making a proposal shortly to remove `extern enum` from the language. * there is no such thing as `packed enum`. * instead of `catch |_|`, omit the capture entirely. * unused function definition with missing parameter name * using `try` outside of a function or test
Diffstat (limited to 'lib/std/macho.zig')
-rw-r--r--lib/std/macho.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/macho.zig b/lib/std/macho.zig
index f66626bafe..8336b04c70 100644
--- a/lib/std/macho.zig
+++ b/lib/std/macho.zig
@@ -1314,13 +1314,13 @@ pub const BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM: u8 = 0x40;
pub const BIND_OPCODE_SET_TYPE_IMM: u8 = 0x50;
pub const BIND_OPCODE_SET_ADDEND_SLEB: u8 = 0x60;
pub const BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB: u8 = 0x70;
-pub const BIND_OPCODE_ADD_ADDR_ULEB: 0x80;
+pub const BIND_OPCODE_ADD_ADDR_ULEB: u8 = 0x80;
pub const BIND_OPCODE_DO_BIND: u8 = 0x90;
pub const BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB: u8 = 0xa0;
pub const BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED: u8 = 0xb0;
-pub const BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB: u8 = xc0;
+pub const BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB: u8 = 0xc0;
-pub const reloc_type_x86_64 = packed enum(u4) {
+pub const reloc_type_x86_64 = enum(u4) {
/// for absolute addresses
X86_64_RELOC_UNSIGNED = 0,
@@ -1352,9 +1352,9 @@ pub const reloc_type_x86_64 = packed enum(u4) {
X86_64_RELOC_TLV,
};
-pub const reloc_type_arm64 = packed enum(u4) {
+pub const reloc_type_arm64 = enum(u4) {
/// For pointers.
- ARM64_RELOC_UNSIGNED = 0,
+ ARM64_RELOC_UNSIGNED,
/// Must be followed by a ARM64_RELOC_UNSIGNED.
ARM64_RELOC_SUBTRACTOR,