diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-08-30 16:34:54 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-08-30 16:34:54 +0000 |
commit | 07cabf6102800aa701bc4d1bd282fafb63b8a416 (patch) | |
tree | 04177dfd1817d99b875976c592cea2f88df6b2ed /lib/VMCore/Core.cpp | |
parent | 699609cf918cbc1ad4d0029a1d4568369854789f (diff) | |
download | external_llvm-07cabf6102800aa701bc4d1bd282fafb63b8a416.zip external_llvm-07cabf6102800aa701bc4d1bd282fafb63b8a416.tar.gz external_llvm-07cabf6102800aa701bc4d1bd282fafb63b8a416.tar.bz2 |
PR2731: C and Ocaml bindings for setTailCall and isTailCall.
Based on patch by Giorgos Korfiatis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 8517a41..2fedc1e 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -963,6 +963,16 @@ void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index, ParamAttr::constructAlignmentFromInt(align))); } +/*--.. Operations on call instructions (only) ..............................--*/ + +int LLVMIsTailCall(LLVMValueRef Call) { + return unwrap<CallInst>(Call)->isTailCall(); +} + +void LLVMSetTailCall(LLVMValueRef Call, int isTailCall) { + unwrap<CallInst>(Call)->setTailCall(isTailCall); +} + /*--.. Operations on phi nodes .............................................--*/ void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, |