diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-05-28 10:33:59 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:56 -0700 |
| commit | 3064d2aa7b9a8ea836cb70884b0640fe902ecc29 (patch) | |
| tree | a3e315a06c0912e03ddac6b04cbe23205872bd31 /src/Module.zig | |
| parent | 3b6ca1d35b950d67fff5964f0063dadf01f30e2d (diff) | |
| download | zig-3064d2aa7b9a8ea836cb70884b0640fe902ecc29.tar.gz zig-3064d2aa7b9a8ea836cb70884b0640fe902ecc29.zip | |
behavior: additional llvm fixes
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig index fe9c59583a..d11a11cf08 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -707,6 +707,10 @@ pub const Decl = struct { return TypedValue{ .ty = decl.ty, .val = decl.val }; } + pub fn internValue(decl: Decl, mod: *Module) Allocator.Error!InternPool.Index { + return decl.val.intern(decl.ty, mod); + } + pub fn isFunction(decl: Decl, mod: *const Module) !bool { const tv = try decl.typedValue(); return tv.ty.zigTypeTag(mod) == .Fn; @@ -7073,7 +7077,7 @@ pub fn atomicPtrAlignment( const int_ty = switch (ty.zigTypeTag(mod)) { .Int => ty, - .Enum => try ty.intTagType(mod), + .Enum => ty.intTagType(mod), .Float => { const bit_count = ty.floatBits(target); if (bit_count > max_atomic_bits) { |
