aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2011-10-14 20:37:49 +0000
committerTorok Edwin <edwintorok@gmail.com>2011-10-14 20:37:49 +0000
commit6563c879964c3bcf5c77d40da8d4c807adf605aa (patch)
treec3bdf644c693a96ed08acccb73af63dca95f5ddb /lib/VMCore
parent31116410de16f435d8c76c53e3d6b95fa812cd2c (diff)
downloadexternal_llvm-6563c879964c3bcf5c77d40da8d4c807adf605aa.zip
external_llvm-6563c879964c3bcf5c77d40da8d4c807adf605aa.tar.gz
external_llvm-6563c879964c3bcf5c77d40da8d4c807adf605aa.tar.bz2
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Core.cpp6
1 files changed, 6 insertions, 0 deletions
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<Instruction>(unwrap(Inst)))
+ return map_to_llvmopcode(C->getOpcode());
+ return (LLVMOpcode)0;
+}
+
/*--.. Call and invoke instructions ........................................--*/
unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr) {