From: Ayke van Laethem Date: Sat, 8 Jun 2019 22:15:38 +0000 (+0000) Subject: [bindings/go] Add Go bindings for CalledValue X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72a39d3b931eae321e28799334025f12cb60d8b4;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362891 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/bindings/go/llvm/ir.go b/bindings/go/llvm/ir.go index 71f741421e8..3bfeac942b2 100644 --- a/bindings/go/llvm/ir.go +++ b/bindings/go/llvm/ir.go @@ -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 //-------------------------------------------------------------------------