mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[DebugInfo] Emit embedded swift into DW_AT_APPLE_flags
To properly initialize the compiler instance on LLDB when debugging embedded Swift programs, emit "-enable-embedded-swift" into the DW_AT_APPLE_flags attribute of the compile unit.
This commit is contained in:
@@ -122,14 +122,16 @@ static clang::CodeGenerator *createClangCodeGenerator(ASTContext &Context,
|
||||
CGO.DebugCompilationDir = Opts.DebugCompilationDir;
|
||||
CGO.DwarfVersion = Opts.DWARFVersion;
|
||||
CGO.DwarfDebugFlags =
|
||||
Opts.getDebugFlags(PD, Context.LangOpts.EnableCXXInterop);
|
||||
Opts.getDebugFlags(PD, Context.LangOpts.EnableCXXInterop,
|
||||
Context.LangOpts.hasFeature(Feature::Embedded));
|
||||
break;
|
||||
case IRGenDebugInfoFormat::CodeView:
|
||||
CGO.EmitCodeView = true;
|
||||
CGO.DebugCompilationDir = Opts.DebugCompilationDir;
|
||||
// This actually contains the debug flags for codeview.
|
||||
CGO.DwarfDebugFlags =
|
||||
Opts.getDebugFlags(PD, Context.LangOpts.EnableCXXInterop);
|
||||
Opts.getDebugFlags(PD, Context.LangOpts.EnableCXXInterop,
|
||||
Context.LangOpts.hasFeature(Feature::Embedded));
|
||||
break;
|
||||
}
|
||||
if (!Opts.TrapFuncName.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user