[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.

Differential Revision: https://reviews.llvm.org/D52972

llvm-svn: 362891
This commit is contained in:
Ayke van Laethem 2019-06-08 22:15:38 +00:00
parent da95e6c92b
commit f675a60ca7
1 changed files with 4 additions and 0 deletions

View File

@ -1275,6 +1275,10 @@ func (v Value) Indices() []uint32 {
return indices
}
// Operations on comparisons
func (v Value) IntPredicate() IntPredicate { return IntPredicate(C.LLVMGetICmpPredicate(v.C)) }
func (v Value) FloatPredicate() FloatPredicate { return FloatPredicate(C.LLVMGetFCmpPredicate(v.C)) }
//-------------------------------------------------------------------------
// llvm.Builder
//-------------------------------------------------------------------------