summaryrefslogtreecommitdiff
path: root/python/lowlevelil.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2019-07-01 22:02:05 -0400
committerJordan Wiens <jordan@psifertex.com>2019-07-01 22:02:05 -0400
commitc9faafcc0c0b0beeb6cde0ee1359b3e3f27b05a0 (patch)
tree10b96f481e41c510ea1cfd81df6333e8f57ade52 /python/lowlevelil.py
parentef6cddbcef4184d1d41f80ac16c56c173e5d38f6 (diff)
add contains for LLIL and MLIL basic blocks
Diffstat (limited to 'python/lowlevelil.py')
-rw-r--r--python/lowlevelil.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 8249afe8..f0a4e2a6 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -2889,6 +2889,11 @@ class LowLevelILBasicBlock(basicblock.BasicBlock):
def __hash__(self):
return hash((self.start, self.end, self._il_function))
+ def __contains__(self, instruction):
+ if type(instruction) != LowLevelILInstruction or instruction.il_basic_block != self:
+ return False
+ return True
+
@property
def il_function(self):
""" """