mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-02 02:14:23 +00:00
[bindings/go] Add Go bindings for CalledValue
This is very useful for inspecting generated IR, there appears to be no other way to get the called function from a CallInst. Revision: https://reviews.llvm.org/D52972 llvm-svn: 362890
This commit is contained in:
parent
a1af64264e
commit
06a69245a1
@ -1228,6 +1228,10 @@ func (v Value) AddCallSiteAttribute(i int, a Attribute) {
|
||||
func (v Value) SetInstrParamAlignment(i int, align int) {
|
||||
C.LLVMSetInstrParamAlignment(v.C, C.unsigned(i), C.unsigned(align))
|
||||
}
|
||||
func (v Value) CalledValue() (rv Value) {
|
||||
rv.C = C.LLVMGetCalledValue(v.C)
|
||||
return
|
||||
}
|
||||
|
||||
// Operations on call instructions (only)
|
||||
func (v Value) IsTailCall() bool { return C.LLVMIsTailCall(v.C) != 0 }
|
||||
|
Loading…
x
Reference in New Issue
Block a user