From 23f619a047ff754eafb84a6ec5f666bbe9e47711 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Sun, 3 May 2026 02:30:34 -0400 Subject: Sort switch blocks in graph view by case number --- python/basicblock.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'python/basicblock.py') diff --git a/python/basicblock.py b/python/basicblock.py index fc8b89e1..69f9f996 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -704,6 +704,14 @@ class BasicBlock: return self.function.get_block_annotations(self.start, self.arch) + @property + def sort_hint(self) -> Optional[int]: + """Graph edge sorting hint for this block (read-only)""" + if self.function is None: + raise ValueError("Attempting to call BasicBlock.sort_hint when Function is None") + + return self.function.get_block_sort_hint(self.start, self.arch) + @property def disassembly_text(self) -> List['_function.DisassemblyTextLine']: """ -- cgit v1.3.1