Index: llvm/bindings/go/llvm/dibuilder.go =================================================================== --- llvm/bindings/go/llvm/dibuilder.go +++ llvm/bindings/go/llvm/dibuilder.go @@ -716,6 +716,12 @@ return string(((*[1 << 20]byte)(unsafe.Pointer(ptr)))[:length:length]) } +// GlobalVariableExpressionVariable returns the DIVariable associated with this +// global variable expression. +func (md Metadata) GlobalVariableExpressionVariable() Metadata { + return Metadata{C.LLVMDIGlobalVariableExpressionGetVariable(md.C)} +} + // LocationLine returns the line number of a DILocation. func (md Metadata) LocationLine() uint { return uint(C.LLVMDILocationGetLine(md.C)) @@ -742,3 +748,24 @@ func (md Metadata) ScopeFile() Metadata { return Metadata{C.LLVMDIScopeGetFile(md.C)} } + +// SubprogramLine returns the line number of a DISubprogram. +func (md Metadata) SubprogramLine() uint { + return uint(C.LLVMDISubprogramGetLine(md.C)) +} + +// VariableFile returns the file (DIFile) of a given variable. +func (md Metadata) VariableFile() Metadata { + return Metadata{C.LLVMDIVariableGetFile(md.C)} +} + +// VariableLine returns the line number of a DIVariable. +func (md Metadata) VariableLine() uint { + return uint(C.LLVMDIVariableGetLine(md.C)) +} + +// VariableScope returns the metadata of the scope associated with this +// variable. +func (md Metadata) VariableScope() Metadata { + return Metadata{C.LLVMDIVariableGetScope(md.C)} +}