diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-12-10 15:10:52 -0800 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-12-11 17:59:46 -0800 |
commit | 60590b149b33eb80d0b52c1c6723fe35817ee897 (patch) | |
tree | 2bcf48868812e4dd17ccc7aec6c13e21060ca4f7 /clang/lib | |
parent | d5a43ce6889e0b96f8175b5235c586aa34c7661b (diff) | |
download | bcm5719-llvm-60590b149b33eb80d0b52c1c6723fe35817ee897.tar.gz bcm5719-llvm-60590b149b33eb80d0b52c1c6723fe35817ee897.zip |
[Remarks][Driver] Ask for line tables when remarks are enabled
Serialized remarks contain debug locations for each remark, by storing a
file path, a line, and a column.
Also, remarks support being embedded in a .dSYM bundle using a separate
section in object files, that is found by `dsymutil` through the debug
map.
In order for tools to map addresses to source and display remarks in the
source, we need line tables, and in order for `dsymutil` to find the
object files containing the remark section, we need to keep the debug
map around.
Differential Revision: https://reviews.llvm.org/D71325
Diffstat (limited to 'clang/lib')
-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); |