diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-07-12 21:08:24 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-07-12 21:08:24 +0000 |
commit | 5e5dfa1fc536e038ae4b253edece760a65235b5d (patch) | |
tree | 69a0dde34e1e71ff61f147cbc0b6c30c0d8fd64a /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | |
parent | ec770aa22803b894b11d8275e665ec8c29a2a5ce (diff) | |
download | bcm5719-llvm-5e5dfa1fc536e038ae4b253edece760a65235b5d.tar.gz bcm5719-llvm-5e5dfa1fc536e038ae4b253edece760a65235b5d.zip |
Don't expose a map in the DWARFContext interface.
Doing so is leaking an implementation detail.
I have an implementation that uses the lld infrastructure and doesn't
use a map or object::SectionRef.
llvm-svn: 307846
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index cbbdf5ca40f..fe89a418a46 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -591,10 +591,10 @@ void DWARFContext::parseCompileUnits() { void DWARFContext::parseTypeUnits() { if (!TUs.empty()) return; - for (const auto &I : getTypesSections()) { + forEachTypesSections([&](const DWARFSection &S) { TUs.emplace_back(); - TUs.back().parse(*this, I.second); - } + TUs.back().parse(*this, S); + }); } void DWARFContext::parseDWOCompileUnits() { @@ -604,10 +604,10 @@ void DWARFContext::parseDWOCompileUnits() { void DWARFContext::parseDWOTypeUnits() { if (!DWOTUs.empty()) return; - for (const auto &I : getTypesDWOSections()) { + forEachTypesDWOSections([&](const DWARFSection &S) { DWOTUs.emplace_back(); - DWOTUs.back().parseDWO(*this, I.second); - } + DWOTUs.back().parseDWO(*this, S); + }); } DWARFCompileUnit *DWARFContext::getCompileUnitForOffset(uint32_t Offset) { |