[Lldb-commits] [lldb] [lldb] Harden PolicyStack: thread-binding, factory consistency, ODR-safe formatting (PR #195774)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 9 09:48:39 PDT 2026
================
@@ -54,21 +76,12 @@ struct Policy {
View view = View::Public;
Capabilities capabilities;
- static Policy PublicState() { return {}; }
-
- static Policy PrivateState() {
- Policy p;
- p.view = View::Private;
- p.capabilities.can_load_frame_providers = false;
- p.capabilities.can_run_frame_recognizers = false;
- return p;
- }
-
- static Policy PublicStateRunningExpression() {
- Policy p;
- p.capabilities.can_run_breakpoint_actions = false;
- return p;
- }
+ /// Static factories. PublicState is the baseline (returns default
+ /// Policy{}). The transition factories below start from
+ /// PolicyStack::Get().Current() and apply their named change on top.
----------------
JDevlieghere wrote:
This should use a Doxygen group. Also, if these are factories, I'd expect them to start with `Get` or `Create` since this returns a copy.
https://github.com/llvm/llvm-project/pull/195774
More information about the lldb-commits
mailing list