mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The loading of additional modules by Sema may trigger an out-of-date PCM rebuild in the Clang module dependencies of the additional module. A PCM rebuild causes the ModuleManager to unload previously loaded ASTFiles. For this reason we must use the cached ASTFile information here instead of the potentially dangling pointer to the ASTFile that is stored in the clang::Module object. This fixes a crash in IRGenDebugInfo when generation DIModule context chains. rdar://problem/47600180