mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00
[llgo] Fix debug
to use latest DIBuilder
bindings
Two recent commits to the LLVM Go bindings caused breaking changes to llgo: 1. r284707 - Moving the `AlignInBits` field from `DIBasicType` to `DIAutoVariable`. 2. r284482 - The `AlignInBits` fields going from `uint64` to `uint32`. This commit updates llgo accordingly. llvm-svn: 288768
This commit is contained in:
parent
b486c49ff5
commit
7695d8996f
@ -250,14 +250,12 @@ func (d *DIBuilder) descriptorBasic(t *types.Basic, name string) llvm.Metadata {
|
|||||||
return d.builder.CreateBasicType(llvm.DIBasicType{
|
return d.builder.CreateBasicType(llvm.DIBasicType{
|
||||||
Name: name,
|
Name: name,
|
||||||
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
||||||
AlignInBits: uint64(d.sizes.Alignof(t) * 8),
|
|
||||||
Encoding: llvm.DW_ATE_unsigned,
|
Encoding: llvm.DW_ATE_unsigned,
|
||||||
})
|
})
|
||||||
default:
|
default:
|
||||||
bt := llvm.DIBasicType{
|
bt := llvm.DIBasicType{
|
||||||
Name: t.String(),
|
Name: t.String(),
|
||||||
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
||||||
AlignInBits: uint64(d.sizes.Alignof(t) * 8),
|
|
||||||
}
|
}
|
||||||
switch bi := t.Info(); {
|
switch bi := t.Info(); {
|
||||||
case bi&types.IsBoolean != 0:
|
case bi&types.IsBoolean != 0:
|
||||||
@ -283,7 +281,7 @@ func (d *DIBuilder) descriptorPointer(t *types.Pointer) llvm.Metadata {
|
|||||||
return d.builder.CreatePointerType(llvm.DIPointerType{
|
return d.builder.CreatePointerType(llvm.DIPointerType{
|
||||||
Pointee: d.DIType(t.Elem()),
|
Pointee: d.DIType(t.Elem()),
|
||||||
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
||||||
AlignInBits: uint64(d.sizes.Alignof(t) * 8),
|
AlignInBits: uint32(d.sizes.Alignof(t) * 8),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +299,7 @@ func (d *DIBuilder) descriptorStruct(t *types.Struct, name string) llvm.Metadata
|
|||||||
Name: f.Name(),
|
Name: f.Name(),
|
||||||
Type: d.DIType(t),
|
Type: d.DIType(t),
|
||||||
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
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),
|
OffsetInBits: uint64(offsets[i] * 8),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -309,7 +307,7 @@ func (d *DIBuilder) descriptorStruct(t *types.Struct, name string) llvm.Metadata
|
|||||||
return d.builder.CreateStructType(d.cu, llvm.DIStructType{
|
return d.builder.CreateStructType(d.cu, llvm.DIStructType{
|
||||||
Name: name,
|
Name: name,
|
||||||
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
||||||
AlignInBits: uint64(d.sizes.Alignof(t) * 8),
|
AlignInBits: uint32(d.sizes.Alignof(t) * 8),
|
||||||
Elements: members,
|
Elements: members,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -345,7 +343,7 @@ func (d *DIBuilder) descriptorNamed(t *types.Named) llvm.Metadata {
|
|||||||
func (d *DIBuilder) descriptorArray(t *types.Array, name string) llvm.Metadata {
|
func (d *DIBuilder) descriptorArray(t *types.Array, name string) llvm.Metadata {
|
||||||
return d.builder.CreateArrayType(llvm.DIArrayType{
|
return d.builder.CreateArrayType(llvm.DIArrayType{
|
||||||
SizeInBits: uint64(d.sizes.Sizeof(t) * 8),
|
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()),
|
ElementType: d.DIType(t.Elem()),
|
||||||
Subscripts: []llvm.DISubrange{{Count: t.Len()}},
|
Subscripts: []llvm.DISubrange{{Count: t.Len()}},
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user