Merge pull request #71729 from kubamracek/embedded-dwarf-types

[embedded] Promote -g to -gdwarf-types by default on embedded Swift
This commit is contained in:
Kuba (Brecka) Mracek
2024-02-21 00:14:48 -08:00
committed by GitHub
2 changed files with 28 additions and 0 deletions

View File

@@ -3276,6 +3276,10 @@ bool CompilerInvocation::parseArgs(
SILOpts.EmbeddedSwift = true;
// OSSA modules are required for deinit de-virtualization.
SILOpts.EnableOSSAModules = true;
// -g is promoted to -gdwarf-types in embedded Swift
if (IRGenOpts.DebugInfoLevel == IRGenDebugInfoLevel::ASTTypes) {
IRGenOpts.DebugInfoLevel = IRGenDebugInfoLevel::DwarfTypes;
}
} else {
if (SILOpts.NoAllocations) {
Diags.diagnose(SourceLoc(), diag::no_allocations_without_embedded);