[all-commits] [llvm/llvm-project] 9d6006: Simplify Target::RunStopHooks()

Julian Lettner via All-commits all-commits at lists.llvm.org
Mon Mar 3 12:11:11 PST 2025


  Branch: refs/heads/users/yln/lldb-simplify-Target_RunStopHooks
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d60069d2b9f669e02653d2fc68c8d8ca870dc0a
      https://github.com/llvm/llvm-project/commit/9d60069d2b9f669e02653d2fc68c8d8ca870dc0a
  Author: Julian Lettner <jlettner at apple.com>
  Date:   2025-03-03 (Mon, 03 Mar 2025)

  Changed paths:
    M lldb/include/lldb/Target/Target.h
    M lldb/source/Target/Target.cpp

  Log Message:
  -----------
  Simplify Target::RunStopHooks()

Introduce `StopHookResult::NoPreference` and
simplify control flow in `Target::RunStopHooks()`.

The algorithm is (in order):
1. "Auto continue" set on any hook -> continue
2. "Stop demanded" by any hook -> stop
3. "Continue requested" by any hook -> continue
4. No hooks, or "no preference" only (default
   stance) -> stop

The new `NoPreference` lets us keep the default
stance, distinguishing case 3. and 4.



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