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:
parent
fa30225181
commit
f3989aa240
4 changed files with 26 additions and 0 deletions
|
|
@ -1420,6 +1420,13 @@ class SwitchInstruction(Instruction):
|
|||
_core.LLVMAddCase(self.ptr, const.ptr, bblk.ptr)
|
||||
|
||||
|
||||
class CompareInstruction(Instruction):
|
||||
|
||||
@property
|
||||
def predicate(self):
|
||||
return _core.LLVMCmpInstGetPredicate(self.ptr)
|
||||
|
||||
|
||||
#===----------------------------------------------------------------------===
|
||||
# Basic block
|
||||
#===----------------------------------------------------------------------===
|
||||
|
|
@ -1469,6 +1476,8 @@ __class_for_valueid = {
|
|||
VALUE_INSTRUCTION + OPCODE_CALL : CallOrInvokeInstruction,
|
||||
VALUE_INSTRUCTION + OPCODE_INVOKE : CallOrInvokeInstruction,
|
||||
VALUE_INSTRUCTION + OPCODE_SWITCH : SwitchInstruction,
|
||||
VALUE_INSTRUCTION + OPCODE_ICMP : CompareInstruction,
|
||||
VALUE_INSTRUCTION + OPCODE_FCMP : CompareInstruction
|
||||
}
|
||||
|
||||
def _make_value(ptr):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue