summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2018-11-09 19:06:09 +0000
committerPaul Robinson <paul.robinson@sony.com>2018-11-09 19:06:09 +0000
commitddbde9a4add367c12b4ff8bda5e7a6b351b645c6 (patch)
tree29081d6179b75582c07b6cd5eb4e00fc3bd592a2 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent731ea7dbc1da611beed2e492446df3408c85e638 (diff)
downloadbcm5719-llvm-ddbde9a4add367c12b4ff8bda5e7a6b351b645c6.tar.gz
bcm5719-llvm-ddbde9a4add367c12b4ff8bda5e7a6b351b645c6.zip
[DWARFv5] Emit normal type units in .debug_info comdats.
Differential Revision: https://reviews.llvm.org/D54282 llvm-svn: 346540
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 070b8fe4ec1..5d50f34d77d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2610,9 +2610,14 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
Ins.first->second = Signature;
if (useSplitDwarf())
+ // FIXME: v5 split type units belong in .debug_info.dwo.
NewTU.setSection(Asm->getObjFileLowering().getDwarfTypesDWOSection());
else {
- NewTU.setSection(Asm->getObjFileLowering().getDwarfTypesSection(Signature));
+ MCSection *Section =
+ getDwarfVersion() <= 4
+ ? Asm->getObjFileLowering().getDwarfTypesSection(Signature)
+ : Asm->getObjFileLowering().getDwarfInfoSection(Signature);
+ NewTU.setSection(Section);
// Non-split type units reuse the compile unit's line table.
CU.applyStmtList(UnitDie);
}
OpenPOWER on IntegriCloud