diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains/Clang.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains/Clang.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index c00d5d07bcf..38c6acc8551 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -3717,6 +3717,11 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D, // Adjust the debug info kind for the given toolchain. TC.adjustDebugInfoKind(DebugInfoKind, Args); + // When emitting remarks, we need at least debug lines in the output. + if (shouldEmitRemarks(Args) && + DebugInfoKind <= codegenoptions::DebugDirectivesOnly) + DebugInfoKind = codegenoptions::DebugLineTablesOnly; + RenderDebugEnablingArgs(Args, CmdArgs, DebugInfoKind, DWARFVersion, DebuggerTuning); |