aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-05-28 10:33:59 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:56 -0700
commit3064d2aa7b9a8ea836cb70884b0640fe902ecc29 (patch)
treea3e315a06c0912e03ddac6b04cbe23205872bd31 /src/codegen/llvm.zig
parent3b6ca1d35b950d67fff5964f0063dadf01f30e2d (diff)
downloadzig-3064d2aa7b9a8ea836cb70884b0640fe902ecc29.tar.gz
zig-3064d2aa7b9a8ea836cb70884b0640fe902ecc29.zip
behavior: additional llvm fixes
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 398a4124cc..956924eff8 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -2773,7 +2773,7 @@ pub const DeclGen = struct {
return dg.context.intType(info.bits);
},
.Enum => {
- const int_ty = try t.intTagType(mod);
+ const int_ty = t.intTagType(mod);
const bit_count = int_ty.intInfo(mod).bits;
assert(bit_count != 0);
return dg.context.intType(bit_count);
@@ -4148,9 +4148,7 @@ pub const DeclGen = struct {
const mod = dg.module;
const int_ty = switch (ty.zigTypeTag(mod)) {
.Int => ty,
- .Enum => ty.intTagType(mod) catch |err| switch (err) {
- error.OutOfMemory => @panic("OOM"),
- },
+ .Enum => ty.intTagType(mod),
.Float => {
if (!is_rmw_xchg) return null;
return dg.context.intType(@intCast(c_uint, ty.abiSize(mod) * 8));
@@ -5100,7 +5098,7 @@ pub const FuncGen = struct {
const mod = self.dg.module;
const scalar_ty = operand_ty.scalarType(mod);
const int_ty = switch (scalar_ty.zigTypeTag(mod)) {
- .Enum => try scalar_ty.intTagType(mod),
+ .Enum => scalar_ty.intTagType(mod),
.Int, .Bool, .Pointer, .ErrorSet => scalar_ty,
.Optional => blk: {
const payload_ty = operand_ty.optionalChild(mod);