diff options
| author | Eric Christopher <echristo@gmail.com> | 2013-09-23 20:55:35 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2013-09-23 20:55:35 +0000 |
| commit | 261d2343028e3439842dcedbb00165b63bf19697 (patch) | |
| tree | 24040f3cfa191b25ec7137f2c002e63b3e0dad11 /llvm/lib/CodeGen/AsmPrinter | |
| parent | 6907b3df701d483b787d91cafa3ecca05f1eeff8 (diff) | |
| download | bcm5719-llvm-261d2343028e3439842dcedbb00165b63bf19697.tar.gz bcm5719-llvm-261d2343028e3439842dcedbb00165b63bf19697.zip | |
Handle gnu pubtypes sections:
a) Make sure we are emitting the correct section in our section labels
when we begin the module.
b) Make sure we are emitting the correct pubtypes section in the
presence of gnu pubtypes.
c) For C++ struct, union, class, and enumeration types are default
external.
llvm-svn: 191225
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 48a7c185ec2..a6de1ac9414 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1966,12 +1966,12 @@ void DwarfDebug::emitSectionLabels() { DwarfLineSectionSym = emitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line"); emitSectionSym(Asm, TLOF.getDwarfLocSection()); - if (HasDwarfPubSections) { - emitSectionSym(Asm, TLOF.getDwarfPubNamesSection()); - emitSectionSym(Asm, TLOF.getDwarfPubTypesSection()); - } else if (GenerateGnuPubSections) { + if (GenerateGnuPubSections) { emitSectionSym(Asm, TLOF.getDwarfGnuPubNamesSection()); emitSectionSym(Asm, TLOF.getDwarfGnuPubTypesSection()); + } else if (HasDwarfPubSections) { + emitSectionSym(Asm, TLOF.getDwarfPubNamesSection()); + emitSectionSym(Asm, TLOF.getDwarfPubTypesSection()); } DwarfStrSectionSym = @@ -2358,6 +2358,10 @@ static dwarf::PubIndexEntryDescriptor computeIndexValue(CompileUnit *CU, case dwarf::DW_TAG_structure_type: case dwarf::DW_TAG_union_type: case dwarf::DW_TAG_enumeration_type: + return dwarf::PubIndexEntryDescriptor( + dwarf::GIEK_TYPE, CU->getLanguage() != dwarf::DW_LANG_C_plus_plus + ? dwarf::GIEL_STATIC + : dwarf::GIEL_EXTERNAL); case dwarf::DW_TAG_typedef: case dwarf::DW_TAG_base_type: case dwarf::DW_TAG_subrange_type: @@ -2446,7 +2450,9 @@ void DwarfDebug::emitDebugPubNames(bool GnuStyle) { void DwarfDebug::emitDebugPubTypes(bool GnuStyle) { const MCSection *ISec = Asm->getObjFileLowering().getDwarfInfoSection(); - const MCSection *PSec = Asm->getObjFileLowering().getDwarfPubTypesSection(); + const MCSection *PSec = + GnuStyle ? Asm->getObjFileLowering().getDwarfGnuPubTypesSection() + : Asm->getObjFileLowering().getDwarfPubTypesSection(); for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(), E = CUMap.end(); |

