mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Disable resilience for modules imported by the MemoryBuffer loader.
The MemoryBuffer loader is used by LLDB during debugging to import binary Swift modules from .swift_ast sections. Modules imported from .swift_ast sections are never produced from textual interfaces. By disabling resilience the expression evaluator in the debugger can directly access private members. rdar://79462915
This commit is contained in:
@@ -1879,7 +1879,7 @@ static bool isDirectToStorageAccess(const DeclContext *UseDC,
|
||||
// If the storage is resilient, we cannot access it directly at all.
|
||||
if (var->isResilient(UseDC->getParentModule(),
|
||||
UseDC->getResilienceExpansion()))
|
||||
return false;
|
||||
return var->getModuleContext()->getBypassResilience();
|
||||
|
||||
if (isa<ConstructorDecl>(AFD) || isa<DestructorDecl>(AFD)) {
|
||||
// The access must also be a member access on 'self' in all language modes.
|
||||
|
||||
Reference in New Issue
Block a user