From f28fb80b7b49226006bbb1696c3c2bec07df891e Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Mon, 8 Aug 2022 13:57:05 -0400 Subject: implement is_thunk, closes PR #3343 --- python/function.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'python/function.py') diff --git a/python/function.py b/python/function.py index e909ed0a..9a0f099a 100644 --- a/python/function.py +++ b/python/function.py @@ -566,6 +566,14 @@ class Function: """function.BasicBlockList of BasicBlocks in the current function (read-only)""" 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)""" -- cgit v1.3.1