diff options
| author | Ayke van Laethem <aykevanlaethem@gmail.com> | 2019-06-08 22:15:38 +0000 |
|---|---|---|
| committer | Ayke van Laethem <aykevanlaethem@gmail.com> | 2019-06-08 22:15:38 +0000 |
| commit | f675a60ca7a93f22e22dd4209504a9846dd04630 (patch) | |
| tree | 3afaeff467ceab283efbd97c97efebcfc72ce958 /llvm/bindings | |
| parent | da95e6c92b01018d929b33e3e3cb9a77844b536c (diff) | |
| download | bcm5719-llvm-f675a60ca7a93f22e22dd4209504a9846dd04630.tar.gz bcm5719-llvm-f675a60ca7a93f22e22dd4209504a9846dd04630.zip | |
[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
Diffstat (limited to 'llvm/bindings')
| -rw-r--r-- | llvm/bindings/go/llvm/ir.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/bindings/go/llvm/ir.go b/llvm/bindings/go/llvm/ir.go index 71f741421e8..3bfeac942b2 100644 --- a/llvm/bindings/go/llvm/ir.go +++ b/llvm/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 //------------------------------------------------------------------------- |

