mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-10 14:25:39 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -86,17 +86,15 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpType DumpType) {
|
|||||||
|
|
||||||
if ((DumpType == DIDT_All || DumpType == DIDT_Types) && getNumTypeUnits()) {
|
if ((DumpType == DIDT_All || DumpType == DIDT_Types) && getNumTypeUnits()) {
|
||||||
OS << "\n.debug_types contents:\n";
|
OS << "\n.debug_types contents:\n";
|
||||||
for (const auto &TUS : type_unit_sections())
|
for (const auto &TU : type_units())
|
||||||
for (const auto &TU : TUS)
|
TU->dump(OS);
|
||||||
TU->dump(OS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((DumpType == DIDT_All || DumpType == DIDT_TypesDwo) &&
|
if ((DumpType == DIDT_All || DumpType == DIDT_TypesDwo) &&
|
||||||
getNumDWOTypeUnits()) {
|
getNumDWOTypeUnits()) {
|
||||||
OS << "\n.debug_types.dwo contents:\n";
|
OS << "\n.debug_types.dwo contents:\n";
|
||||||
for (const auto &DWOTUS : dwo_type_unit_sections())
|
for (const auto &DWOTU : dwo_type_units())
|
||||||
for (const auto &DWOTU : DWOTUS)
|
DWOTU->dump(OS);
|
||||||
DWOTU->dump(OS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DumpType == DIDT_All || DumpType == DIDT_Loc) {
|
if (DumpType == DIDT_All || DumpType == DIDT_Loc) {
|
||||||
@ -339,17 +337,15 @@ void DWARFContext::parseTypeUnits() {
|
|||||||
uint32_t offset = 0;
|
uint32_t offset = 0;
|
||||||
const DataExtractor &DIData =
|
const DataExtractor &DIData =
|
||||||
DataExtractor(I.second.Data, isLittleEndian(), 0);
|
DataExtractor(I.second.Data, isLittleEndian(), 0);
|
||||||
TUs.push_back(DWARFUnitSection<DWARFTypeUnit>());
|
|
||||||
auto &TUS = TUs.back();
|
|
||||||
while (DIData.isValidOffset(offset)) {
|
while (DIData.isValidOffset(offset)) {
|
||||||
std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(*this,
|
std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(*this,
|
||||||
getDebugAbbrev(), I.second.Data, getRangeSection(),
|
getDebugAbbrev(), I.second.Data, getRangeSection(),
|
||||||
getStringSection(), StringRef(), getAddrSection(),
|
getStringSection(), StringRef(), getAddrSection(),
|
||||||
&I.second.Relocs, isLittleEndian(), TUS));
|
&I.second.Relocs, isLittleEndian(), TUs));
|
||||||
if (!TU->extract(DIData, &offset))
|
if (!TU->extract(DIData, &offset))
|
||||||
break;
|
break;
|
||||||
TUS.push_back(std::move(TU));
|
TUs.push_back(std::move(TU));
|
||||||
offset = TUS.back()->getNextUnitOffset();
|
offset = TUs.back()->getNextUnitOffset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -380,17 +376,15 @@ void DWARFContext::parseDWOTypeUnits() {
|
|||||||
uint32_t offset = 0;
|
uint32_t offset = 0;
|
||||||
const DataExtractor &DIData =
|
const DataExtractor &DIData =
|
||||||
DataExtractor(I.second.Data, isLittleEndian(), 0);
|
DataExtractor(I.second.Data, isLittleEndian(), 0);
|
||||||
DWOTUs.push_back(DWARFUnitSection<DWARFTypeUnit>());
|
|
||||||
auto &TUS = DWOTUs.back();
|
|
||||||
while (DIData.isValidOffset(offset)) {
|
while (DIData.isValidOffset(offset)) {
|
||||||
std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(*this,
|
std::unique_ptr<DWARFTypeUnit> TU(new DWARFTypeUnit(*this,
|
||||||
getDebugAbbrevDWO(), I.second.Data, getRangeDWOSection(),
|
getDebugAbbrevDWO(), I.second.Data, getRangeDWOSection(),
|
||||||
getStringDWOSection(), getStringOffsetDWOSection(), getAddrSection(),
|
getStringDWOSection(), getStringOffsetDWOSection(), getAddrSection(),
|
||||||
&I.second.Relocs, isLittleEndian(), TUS));
|
&I.second.Relocs, isLittleEndian(), DWOTUs));
|
||||||
if (!TU->extract(DIData, &offset))
|
if (!TU->extract(DIData, &offset))
|
||||||
break;
|
break;
|
||||||
TUS.push_back(std::move(TU));
|
DWOTUs.push_back(std::move(TU));
|
||||||
offset = TUS.back()->getNextUnitOffset();
|
offset = DWOTUs.back()->getNextUnitOffset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace llvm {
|
|||||||
class DWARFContext : public DIContext {
|
class DWARFContext : public DIContext {
|
||||||
|
|
||||||
DWARFUnitSection<DWARFCompileUnit> CUs;
|
DWARFUnitSection<DWARFCompileUnit> CUs;
|
||||||
SmallVector<DWARFUnitSection<DWARFTypeUnit>,1> TUs;
|
DWARFUnitSection<DWARFTypeUnit> TUs;
|
||||||
std::unique_ptr<DWARFDebugAbbrev> Abbrev;
|
std::unique_ptr<DWARFDebugAbbrev> Abbrev;
|
||||||
std::unique_ptr<DWARFDebugLoc> Loc;
|
std::unique_ptr<DWARFDebugLoc> Loc;
|
||||||
std::unique_ptr<DWARFDebugAranges> Aranges;
|
std::unique_ptr<DWARFDebugAranges> Aranges;
|
||||||
@ -38,7 +38,7 @@ class DWARFContext : public DIContext {
|
|||||||
std::unique_ptr<DWARFDebugFrame> DebugFrame;
|
std::unique_ptr<DWARFDebugFrame> DebugFrame;
|
||||||
|
|
||||||
DWARFUnitSection<DWARFCompileUnit> DWOCUs;
|
DWARFUnitSection<DWARFCompileUnit> DWOCUs;
|
||||||
SmallVector<DWARFUnitSection<DWARFTypeUnit>,1> DWOTUs;
|
DWARFUnitSection<DWARFTypeUnit> DWOTUs;
|
||||||
std::unique_ptr<DWARFDebugAbbrev> AbbrevDWO;
|
std::unique_ptr<DWARFDebugAbbrev> AbbrevDWO;
|
||||||
std::unique_ptr<DWARFDebugLocDWO> LocDWO;
|
std::unique_ptr<DWARFDebugLocDWO> LocDWO;
|
||||||
|
|
||||||
@ -77,7 +77,6 @@ public:
|
|||||||
|
|
||||||
typedef DWARFUnitSection<DWARFCompileUnit>::iterator_range cu_iterator_range;
|
typedef DWARFUnitSection<DWARFCompileUnit>::iterator_range cu_iterator_range;
|
||||||
typedef DWARFUnitSection<DWARFTypeUnit>::iterator_range tu_iterator_range;
|
typedef DWARFUnitSection<DWARFTypeUnit>::iterator_range tu_iterator_range;
|
||||||
typedef iterator_range<SmallVectorImpl<DWARFUnitSection<DWARFTypeUnit>>::iterator> tu_section_iterator_range;
|
|
||||||
|
|
||||||
/// Get compile units in this context.
|
/// Get compile units in this context.
|
||||||
cu_iterator_range compile_units() {
|
cu_iterator_range compile_units() {
|
||||||
@ -86,9 +85,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get type units in this context.
|
/// Get type units in this context.
|
||||||
tu_section_iterator_range type_unit_sections() {
|
tu_iterator_range type_units() {
|
||||||
parseTypeUnits();
|
parseTypeUnits();
|
||||||
return tu_section_iterator_range(TUs.begin(), TUs.end());
|
return tu_iterator_range(TUs.begin(), TUs.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get compile units in the DWO context.
|
/// Get compile units in the DWO context.
|
||||||
@ -98,9 +97,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get type units in the DWO context.
|
/// Get type units in the DWO context.
|
||||||
tu_section_iterator_range dwo_type_unit_sections() {
|
tu_iterator_range dwo_type_units() {
|
||||||
parseDWOTypeUnits();
|
parseDWOTypeUnits();
|
||||||
return tu_section_iterator_range(DWOTUs.begin(), DWOTUs.end());
|
return tu_iterator_range(DWOTUs.begin(), DWOTUs.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the number of compile units in this context.
|
/// Get the number of compile units in this context.
|
||||||
|
Reference in New Issue
Block a user