[all-commits] [llvm/llvm-project] 5e5f7e: [lldb] Expose block equality with SBBlock. (#184222)

John Harrison via All-commits all-commits at lists.llvm.org
Tue Mar 3 16:20:20 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e5f7efd77064a1b05b2596dfab39966ce828359
      https://github.com/llvm/llvm-project/commit/5e5f7efd77064a1b05b2596dfab39966ce828359
  Author: John Harrison <harjohn at google.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M lldb/include/lldb/API/SBBlock.h
    M lldb/source/API/SBBlock.cpp
    A lldb/test/API/python_api/block/Makefile
    A lldb/test/API/python_api/block/TestBlocks.py
    A lldb/test/API/python_api/block/fn.c
    A lldb/test/API/python_api/block/main.c

  Log Message:
  -----------
  [lldb] Expose block equality with SBBlock. (#184222)

Adding the `operator==` and `operator!=` for SBBlock. This should allow
us to compare blocks within a frame, like:

```python
block = frame.GetBlock()
while True:
  if block == frame.GetFrameBlock():
    # we're at the top function scope.
  else:
    # we're at an inner block scope.
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list