return d.builder.CreateBasicType(llvm.DIBasicType{
Name: name,
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
- AlignInBits: uint64(d.sizes.Alignof(t) * 8),
Encoding: llvm.DW_ATE_unsigned,
})
default:
bt := llvm.DIBasicType{
Name: t.String(),
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
- AlignInBits: uint64(d.sizes.Alignof(t) * 8),
}
switch bi := t.Info(); {
case bi&types.IsBoolean != 0:
return d.builder.CreatePointerType(llvm.DIPointerType{
Pointee: d.DIType(t.Elem()),
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
- AlignInBits: uint64(d.sizes.Alignof(t) * 8),
+ AlignInBits: uint32(d.sizes.Alignof(t) * 8),
})
}
Name: f.Name(),
Type: d.DIType(t),
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
- AlignInBits: uint64(d.sizes.Alignof(t) * 8),
+ AlignInBits: uint32(d.sizes.Alignof(t) * 8),
OffsetInBits: uint64(offsets[i] * 8),
})
}
return d.builder.CreateStructType(d.cu, llvm.DIStructType{
Name: name,
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
- AlignInBits: uint64(d.sizes.Alignof(t) * 8),
+ AlignInBits: uint32(d.sizes.Alignof(t) * 8),
Elements: members,
})
}
func (d *DIBuilder) descriptorArray(t *types.Array, name string) llvm.Metadata {
return d.builder.CreateArrayType(llvm.DIArrayType{
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
- AlignInBits: uint64(d.sizes.Alignof(t) * 8),
+ AlignInBits: uint32(d.sizes.Alignof(t) * 8),
ElementType: d.DIType(t.Elem()),
Subscripts: []llvm.DISubrange{{Count: t.Len()}},
})