summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-11-14 09:22:16 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-11-14 09:22:16 +0000
commit91829eef650fdad7b2d566bf3f0cb623fd4bad09 (patch)
tree5ac2468deb8c9c32afc4014745f1a6ba9083e5e5 /clang/lib/CodeGen/CGDebugInfo.cpp
parent39e86fa5e49005898c47ca6b23bc465f65fe66c7 (diff)
downloadbcm5719-llvm-91829eef650fdad7b2d566bf3f0cb623fd4bad09.tar.gz
bcm5719-llvm-91829eef650fdad7b2d566bf3f0cb623fd4bad09.zip
[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
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 24c76c2037f..1b3ada13a38 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -581,8 +581,11 @@ void CGDebugInfo::CreateCompileUnit() {
CGOpts.EmitVersionIdentMetadata ? Producer : "",
LO.Optimize || CGOpts.PrepareForLTO || CGOpts.PrepareForThinLTO,
CGOpts.DwarfDebugFlags, RuntimeVers,
- CGOpts.EnableSplitDwarf ? "" : CGOpts.SplitDwarfFile, EmissionKind,
- 0 /* DWOid */, CGOpts.SplitDwarfInlining, CGOpts.DebugInfoForProfiling,
+ (CGOpts.getSplitDwarfMode() != CodeGenOptions::NoFission)
+ ? ""
+ : CGOpts.SplitDwarfFile,
+ EmissionKind, 0 /* DWOid */, CGOpts.SplitDwarfInlining,
+ CGOpts.DebugInfoForProfiling,
CGM.getTarget().getTriple().isNVPTX()
? llvm::DICompileUnit::DebugNameTableKind::None
: static_cast<llvm::DICompileUnit::DebugNameTableKind>(
OpenPOWER on IntegriCloud