mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #39032 from adrian-prantl/79462915-5.5
Disable resilience for modules imported by the MemoryBuffer loader.
This commit is contained in:
@@ -1234,6 +1234,11 @@ MemoryBufferSerializedModuleLoader::loadModule(SourceLoc importLoc,
|
||||
if (!file)
|
||||
return nullptr;
|
||||
|
||||
// The MemoryBuffer loader is used by LLDB during debugging. Modules imported
|
||||
// from .swift_ast sections are never produced from textual interfaces. By
|
||||
// disabling resilience the debugger can directly access private members.
|
||||
if (BypassResilience)
|
||||
M->setBypassResilience();
|
||||
M->addFile(*file);
|
||||
Ctx.addLoadedModule(M);
|
||||
return M;
|
||||
|
||||
Reference in New Issue
Block a user