mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-05 08:58:30 +00:00
[bindings/go] Add Subprogram method
This method allows getting the subprogram metadata object from a function value. Differential Revision: https://reviews.llvm.org/D71528
This commit is contained in:
parent
3566c75ca8
commit
555fc92a85
@ -586,6 +586,11 @@ func (v Value) SetSubprogram(sp Metadata) {
|
||||
C.LLVMSetSubprogram(v.C, sp.C)
|
||||
}
|
||||
|
||||
func (v Value) Subprogram() (md Metadata) {
|
||||
md.C = C.LLVMGetSubprogram(v.C)
|
||||
return
|
||||
}
|
||||
|
||||
func boolToCInt(v bool) C.int {
|
||||
if v {
|
||||
return 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user