diff options
| author | Frederic Riss <friss@apple.com> | 2014-09-26 12:34:06 +0000 |
|---|---|---|
| committer | Frederic Riss <friss@apple.com> | 2014-09-26 12:34:06 +0000 |
| commit | 82d5c5139f32bb2e5c5bd4723bdf08169606d9b6 (patch) | |
| tree | a8edb398296d38de6ca61e05671dcaa96b3fc5fa /llvm/lib/DebugInfo/DWARFContext.cpp | |
| parent | 6b65eb0642165caf410526745a4f8b172fa23fb9 (diff) | |
| download | bcm5719-llvm-82d5c5139f32bb2e5c5bd4723bdf08169606d9b6.tar.gz bcm5719-llvm-82d5c5139f32bb2e5c5bd4723bdf08169606d9b6.zip | |
Revert "Store TypeUnits in a SmallVector<DWARFUnitSection> instead of a single DWARFUnitSection."
This reverts commit r218513.
Buildbots using libstdc++ issue an error when trying to copy
SmallVector<std::unique_ptr<>>. Revert the commit until we have a fix.
llvm-svn: 218514
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFContext.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARFContext.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/llvm/lib/DebugInfo/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARFContext.cpp index 1f9491002d2..1be0691a1d9 100644 --- a/llvm/lib/DebugInfo/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARFContext.cpp @@ -86,17 +86,15 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpType DumpType) { if ((DumpType == DIDT_All || DumpType == DIDT_Types) && getNumTypeUnits()) { OS << "\n.debug_types contents:\n"; - for (const auto &TUS : type_unit_sections()) - for (const auto &TU : TUS) - TU->dump(OS); + for (const auto &TU : type_units()) + TU->dump(OS); } if ((DumpType == DIDT_All || DumpType == DIDT_TypesDwo) && getNumDWOTypeUnits()) { OS << "\n.debug_types.dwo contents:\n"; - for (const auto &DWOTUS : dwo_type_unit_sections()) - for (const auto &DWOTU : DWOTUS) - DWOTU->dump(OS); + for (const auto &DWOTU : dwo_type_units()) + DWOTU->dump(OS); } if (DumpType == DIDT_All || DumpType == DIDT_Loc) { @@ -339,17 +337,15 @@ void DWARFContext::parseTypeUnits() { uint32_t offset = 0; const DataExtractor &DIData = DataExtractor(I.second.Data, isLittleEndian(), 0); - TUs.push_back(DWARFUnitSection<DWARFTypeUnit>()); - auto &TUS = TUs.back(); while (DIData.isValidOffset(offset)) { std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(*this, getDebugAbbrev(), I.second.Data, getRangeSection(), getStringSection(), StringRef(), getAddrSection(), - &I.second.Relocs, isLittleEndian(), TUS)); + &I.second.Relocs, isLittleEndian(), TUs)); if (!TU->extract(DIData, &offset)) break; - TUS.push_back(std::move(TU)); - offset = TUS.back()->getNextUnitOffset(); + TUs.push_back(std::move(TU)); + offset = TUs.back()->getNextUnitOffset(); } } } @@ -380,17 +376,15 @@ void DWARFContext::parseDWOTypeUnits() { uint32_t offset = 0; const DataExtractor &DIData = DataExtractor(I.second.Data, isLittleEndian(), 0); - DWOTUs.push_back(DWARFUnitSection<DWARFTypeUnit>()); - auto &TUS = DWOTUs.back(); while (DIData.isValidOffset(offset)) { std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(*this, getDebugAbbrevDWO(), I.second.Data, getRangeDWOSection(), getStringDWOSection(), getStringOffsetDWOSection(), getAddrSection(), - &I.second.Relocs, isLittleEndian(), TUS)); + &I.second.Relocs, isLittleEndian(), DWOTUs)); if (!TU->extract(DIData, &offset)) break; - TUS.push_back(std::move(TU)); - offset = TUS.back()->getNextUnitOffset(); + DWOTUs.push_back(std::move(TU)); + offset = DWOTUs.back()->getNextUnitOffset(); } } } |

