From 6563c879964c3bcf5c77d40da8d4c807adf605aa Mon Sep 17 00:00:00 2001 From: Torok Edwin Date: Fri, 14 Oct 2011 20:37:49 +0000 Subject: ocaml bindings: add getopcode for constant and instruction, and int64_of_const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141990 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Core.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/VMCore') diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 77d2e74..a505e4b 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -1591,6 +1591,12 @@ LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst) { return (LLVMIntPredicate)0; } +LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst) { + if (Instruction *C = dyn_cast(unwrap(Inst))) + return map_to_llvmopcode(C->getOpcode()); + return (LLVMOpcode)0; +} + /*--.. Call and invoke instructions ........................................--*/ unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr) { -- cgit v1.1