From 9cfa86c212e08ee5f8529c5c7dc36e19f5de4b2b Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Thu, 9 Jan 2025 17:24:21 -0800 Subject: [PATCH] Respect "getBypassResilience" on "isResilient" LLDB sets BypassResilience to have direct access to private properties of modules built with resilience. This setting is ignored in many paths that check resiliency though, which causes LLDB to fail to evaluate certain expressions. This commit simply makes sure that `isResilient` checks whether resiliency should be bypassed or not. rdar://137876089 --- include/swift/AST/Module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/swift/AST/Module.h b/include/swift/AST/Module.h index b323e374d2fe2..05b99c74fcbba 100644 --- a/include/swift/AST/Module.h +++ b/include/swift/AST/Module.h @@ -857,7 +857,7 @@ class ModuleDecl ModuleDecl *getTopLevelModule(bool overlay = false); bool isResilient() const { - return getResilienceStrategy() != ResilienceStrategy::Default; + return getResilienceStrategy() != ResilienceStrategy::Default && !getBypassResilience(); } /// True if this module is resilient AND also does _not_ allow