We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67e4a39 commit 790f5cdCopy full SHA for 790f5cd
compiler/map.go
@@ -301,9 +301,9 @@ func (b *builder) zeroUndefBytes(typ types.Type, ptr llvm.Value) error {
301
// - padding within each element
302
// - padding between elements
303
304
- for i := uint64(0); i < uint64(typ.Len()); i++ {
+ for i := 0; i < llvmArrayType.ArrayLength(); i++ {
305
// for each element, first clear any undef bytes in the element itself
306
- offset := b.targetData.ElementOffset(llvmArrayType, int(i))
+ offset := b.targetData.ElementOffset(llvmArrayType, i)
307
llvmOffset := llvm.ConstInt(b.uintptrType, offset, false)
308
ptr := b.CreateGEP(b.ctx.Int8Type(), base, []llvm.Value{llvmOffset}, "")
309
0 commit comments