summaryrefslogtreecommitdiff
path: root/python/function.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2022-08-08 13:57:05 -0400
committerJordan Wiens <jordan@psifertex.com>2022-08-08 13:57:05 -0400
commitf28fb80b7b49226006bbb1696c3c2bec07df891e (patch)
treeb8589d3f62caa683241ebad1078904ac15c94fb3 /python/function.py
parenteb5d564e7919b217b7a932fc7f9e576221e89574 (diff)
implement is_thunk, closes PR #3343
Diffstat (limited to 'python/function.py')
-rw-r--r--python/function.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py
index e909ed0a..9a0f099a 100644
--- a/python/function.py
+++ b/python/function.py
@@ -567,6 +567,14 @@ class Function:
return BasicBlockList(self)
@property
+ def is_thunk(self) -> bool:
+ """Returns True if the function starts with a Tailcall (read-only)"""
+ if self.llil_if_available is not None:
+ return self.llil_if_available.is_thunk
+ else:
+ return False
+
+ @property
def comments(self) -> Dict[int, str]:
"""Dict of comments (read-only)"""
count = ctypes.c_ulonglong()