[embedded] Promote -g to -gdwarf-types by default on embedded Swift

This commit is contained in:
Kuba Mracek
2024-02-19 11:41:05 -08:00
parent d35dcc8f9c
commit 1f165228e6
2 changed files with 28 additions and 0 deletions

View File

@@ -3274,6 +3274,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);