mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01: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
d67b833b23
commit
b8b1c0544c
@ -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…
Reference in New Issue
Block a user