diff options
Diffstat (limited to 'bindings/go/llvm/dibuilder.go')
-rw-r--r-- | bindings/go/llvm/dibuilder.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bindings/go/llvm/dibuilder.go b/bindings/go/llvm/dibuilder.go index 3b1a1a6..f03f740 100644 --- a/bindings/go/llvm/dibuilder.go +++ b/bindings/go/llvm/dibuilder.go @@ -343,6 +343,38 @@ func (d *DIBuilder) CreateStructType(scope Metadata, t DIStructType) Metadata { return Metadata{C: result} } +// DIReplaceableCompositeType holds the values for creating replaceable +// composite type debug metadata. +type DIReplaceableCompositeType struct { + Tag dwarf.Tag + Name string + File Metadata + Line int + RuntimeLang int + SizeInBits uint64 + AlignInBits uint64 + Flags int +} + +// CreateReplaceableCompositeType creates replaceable composite type debug metadata. +func (d *DIBuilder) CreateReplaceableCompositeType(scope Metadata, t DIReplaceableCompositeType) Metadata { + name := C.CString(t.Name) + defer C.free(unsafe.Pointer(name)) + result := C.LLVMDIBuilderCreateReplaceableCompositeType( + d.ref, + C.unsigned(t.Tag), + name, + scope.C, + t.File.C, + C.unsigned(t.Line), + C.unsigned(t.RuntimeLang), + C.uint64_t(t.SizeInBits), + C.uint64_t(t.AlignInBits), + C.unsigned(t.Flags), + ) + return Metadata{C: result} +} + // DIMemberType holds the values for creating member type debug metadata. type DIMemberType struct { Name string |