diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-03-27 06:55:48 -0400 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-03-28 23:12:19 +0300 |
| commit | dd66e0addb30d795a04324096c913ca89ccbcf40 (patch) | |
| tree | 928cf49e81d9047d629ff40832719d40dd3cca0f /src/codegen/llvm.zig | |
| parent | 2b805526033b0446fba7f38990df707204e7e23a (diff) | |
| download | zig-dd66e0addb30d795a04324096c913ca89ccbcf40.tar.gz zig-dd66e0addb30d795a04324096c913ca89ccbcf40.zip | |
Sema: fix empty slice pointer value
We just checked that inst_child_ty was effectively a zero-bit type, so
it is certainly not the non-zero alignment we are looking for.
Closes #15085
Diffstat (limited to 'src/codegen/llvm.zig')
| -rw-r--r-- | src/codegen/llvm.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index dd13087afe..4b28fe2afe 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -3397,7 +3397,7 @@ pub const DeclGen = struct { }; return dg.context.constStruct(&fields, fields.len, .False); }, - .int_u64, .one, .int_big_positive => { + .int_u64, .one, .int_big_positive, .lazy_align, .lazy_size => { const llvm_usize = try dg.lowerType(Type.usize); const llvm_int = llvm_usize.constInt(tv.val.toUnsignedInt(target), .False); return llvm_int.constIntToPtr(try dg.lowerType(tv.ty)); |
