Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2024-06-13 09:34:17 -07:00
3 changed files with 12 additions and 24 deletions

View File

@@ -1963,12 +1963,14 @@ bool IRGenModule::finalize() {
}
emitLazyPrivateDefinitions();
// Finalize clang IR-generation.
finalizeClangCodeGen();
// Finalize Swift debug info before running Clang codegen, because it may
// delete the llvm module.
if (DebugInfo)
DebugInfo->finalize();
// Finalize clang IR-generation.
finalizeClangCodeGen();
// If that failed, report failure up and skip the final clean-up.
if (!ClangCodeGen->GetModule())
return false;