mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
LLVM Builder: Add toLlvm helper to Alignment
This commit is contained in:
parent
2801bf6400
commit
fd3b81f93b
@ -1982,6 +1982,10 @@ pub const Alignment = enum(u6) {
|
||||
return if (self == .default) null else @as(u64, 1) << @intFromEnum(self);
|
||||
}
|
||||
|
||||
pub fn toLlvm(self: Alignment) u6 {
|
||||
return if (self == .default) 0 else (@intFromEnum(self) + 1);
|
||||
}
|
||||
|
||||
pub fn format(
|
||||
self: Alignment,
|
||||
comptime prefix: []const u8,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user