mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
add binding to read icmp predicate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141287 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1552,6 +1552,15 @@ void LLVMInstructionEraseFromParent(LLVMValueRef Inst) {
|
||||
unwrap<Instruction>(Inst)->eraseFromParent();
|
||||
}
|
||||
|
||||
LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst) {
|
||||
if (ICmpInst *I = dyn_cast<ICmpInst>(unwrap(Inst)))
|
||||
return (LLVMIntPredicate)I->getPredicate();
|
||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst)))
|
||||
if (CE->getOpcode() == Instruction::ICmp)
|
||||
return (LLVMIntPredicate)CE->getPredicate();
|
||||
return (LLVMIntPredicate)0;
|
||||
}
|
||||
|
||||
/*--.. Call and invoke instructions ........................................--*/
|
||||
|
||||
unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr) {
|
||||
|
Reference in New Issue
Block a user