diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-06 01:42:00 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-06 01:42:00 +0000 |
commit | c3d9e9e55ffea2b04e254cd9ce45136e76ed5cbb (patch) | |
tree | 995bea70eca7f21d808f9201678808bcc671f71c /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 57a98509616eb5c17821c84de64a9995509bb636 (diff) | |
download | bcm5719-llvm-c3d9e9e55ffea2b04e254cd9ce45136e76ed5cbb.tar.gz bcm5719-llvm-c3d9e9e55ffea2b04e254cd9ce45136e76ed5cbb.zip |
DebugInfo: Shrink pubnames/pubtypes in the presence of type units by only emitting pub sections for compile units
llvm-svn: 203057
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index a59b40d90bf..6404e4b5229 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2310,10 +2310,10 @@ void DwarfDebug::emitDebugPubNames(bool GnuStyle) { GnuStyle ? Asm->getObjFileLowering().getDwarfGnuPubNamesSection() : Asm->getObjFileLowering().getDwarfPubNamesSection(); - DwarfFile &Holder = useSplitDwarf() ? SkeletonHolder : InfoHolder; - const SmallVectorImpl<DwarfUnit *> &Units = Holder.getUnits(); - for (unsigned i = 0; i != Units.size(); ++i) { - DwarfUnit *TheU = Units[i]; + for (const auto &NU : CUMap) { + DwarfCompileUnit *TheU = NU.second; + if (auto Skeleton = static_cast<DwarfCompileUnit *>(TheU->getSkeleton())) + TheU = Skeleton; unsigned ID = TheU->getUniqueID(); // Start the dwarf pubnames section. @@ -2374,10 +2374,10 @@ void DwarfDebug::emitDebugPubTypes(bool GnuStyle) { GnuStyle ? Asm->getObjFileLowering().getDwarfGnuPubTypesSection() : Asm->getObjFileLowering().getDwarfPubTypesSection(); - DwarfFile &Holder = useSplitDwarf() ? SkeletonHolder : InfoHolder; - const SmallVectorImpl<DwarfUnit *> &Units = Holder.getUnits(); - for (unsigned i = 0; i != Units.size(); ++i) { - DwarfUnit *TheU = Units[i]; + for (const auto &NU : CUMap) { + DwarfCompileUnit *TheU = NU.second; + if (auto Skeleton = static_cast<DwarfCompileUnit *>(TheU->getSkeleton())) + TheU = Skeleton; unsigned ID = TheU->getUniqueID(); // Start the dwarf pubtypes section. |