[Clang] - Add '-gsplit-dwarf[=split,=single]' version for '-gsplit-dwarf' option.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 14 Nov 2018 09:22:16 +0000 (09:22 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 14 Nov 2018 09:22:16 +0000 (09:22 +0000)
commit91829eef650fdad7b2d566bf3f0cb623fd4bad09
tree5ac2468deb8c9c32afc4014745f1a6ba9083e5e5
parent39e86fa5e49005898c47ca6b23bc465f65fe66c7
[Clang] - Add '-gsplit-dwarf[=split,=single]' version for '-gsplit-dwarf' option.

The DWARF5 specification says(Appendix F.1):

"The sections that do not require relocation, however, can be
written to the relocatable object (.o) file but ignored by the
linker or they can be written to a separate DWARF object (.dwo)
file that need not be accessed by the linker."

The first part describes a single file split DWARF feature and there
is no way to trigger this behavior atm.
Fortunately, no many changes are required to keep *.dwo sections
in a .o, the patch does that.

Differential revision: https://reviews.llvm.org/D52296

llvm-svn: 346837
15 files changed:
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Driver/Options.td
clang/include/clang/Frontend/CodeGenOptions.def
clang/include/clang/Frontend/CodeGenOptions.h
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/CommonArgs.h
clang/lib/Driver/ToolChains/Gnu.cpp
clang/lib/Driver/ToolChains/MinGW.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/split-debug-single-file.c [new file with mode: 0644]
clang/test/Driver/split-debug.c
clang/test/Driver/split-debug.s