CompareInstruction class (Seth Warn)

git-svn-id: http://llvm-py.googlecode.com/svn/trunk@76 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
mdevan.foobar 2009-03-25 12:14:28 +00:00
commit f3989aa240
4 changed files with 26 additions and 0 deletions

View file

@ -240,6 +240,13 @@ unsigned LLVMInstGetOpcode(LLVMValueRef inst)
return instp->getOpcode();
}
unsigned LLVMCmpInstGetPredicate(LLVMValueRef cmpinst)
{
llvm::CmpInst *instp = llvm::unwrap<llvm::CmpInst>(cmpinst);
assert(instp);
return instp->getPredicate();
}
/* llvm::unwrap a set of `n' wrapped objects starting at `values',
* into a vector of pointers to llvm::unwrapped objects `out'. */
template <typename W, typename UW>