diff --git a/lib/Serialization/SerializedModuleLoader.cpp b/lib/Serialization/SerializedModuleLoader.cpp index acda28350da2f..c0d81d8d45b79 100644 --- a/lib/Serialization/SerializedModuleLoader.cpp +++ b/lib/Serialization/SerializedModuleLoader.cpp @@ -1788,10 +1788,11 @@ MemoryBufferSerializedModuleLoader::loadModule(SourceLoc importLoc, Ctx.removeLoadedModule(moduleID.Item); 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) + // The MemoryBuffer loader is used by LLDB during debugging. Modules + // imported from .swift_ast sections are not typically produced from + // textual interfaces. By disabling resilience, the debugger can + // directly access private members. + if (BypassResilience && !M->isBuiltFromInterface()) M->setBypassResilience(); return M;