[C API] PR19859: Add LLVMGetFCmpPredicate and LLVMConstRealGetDouble.

Patch by Gabriel Radanne <drupyog@zoho.com>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Zotov
2014-10-28 19:46:44 +00:00
parent 586cf3d88d
commit 437b107671
2 changed files with 49 additions and 1 deletions

View File

@ -1548,6 +1548,14 @@ unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal);
*/
long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal);
/**
* Obtain the double value for an floating point constant value.
* losesInfo indicates if some precision was lost in the conversion.
*
* @see llvm::ConstantFP::getDoubleValue
*/
double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo);
/**
* @}
*/
@ -2408,6 +2416,16 @@ LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst);
*/
LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst);
/**
* Obtain the float predicate of an instruction.
*
* This is only valid for instructions that correspond to llvm::FCmpInst
* or llvm::ConstantExpr whose opcode is llvm::Instruction::FCmp.
*
* @see llvm::FCmpInst::getPredicate()
*/
LLVMRealPredicate LLVMGetFCmpPredicate(LLVMValueRef Inst);
/**
* Create a copy of 'this' instruction that is identical in all ways
* except the following: