summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 1b11451ac30..aaca625082d 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -939,20 +939,16 @@ bool ELFObjectWriter::isLocal(const MCSymbolData &Data, bool isUsedInReloc) {
void ELFObjectWriter::computeIndexMap(MCAssembler &Asm,
SectionIndexMapTy &SectionIndexMap) {
unsigned Index = 1;
- for (MCAssembler::iterator it = Asm.begin(),
- ie = Asm.end(); it != ie; ++it) {
+ for (const MCSectionData &SD : Asm) {
const MCSectionELF &Section =
- static_cast<const MCSectionELF &>(it->getSection());
+ static_cast<const MCSectionELF &>(SD.getSection());
if (Section.getType() != ELF::SHT_GROUP)
continue;
SectionIndexMap[&Section] = Index++;
}
std::vector<const MCSectionELF *> RelSections;
-
- for (MCAssembler::iterator it = Asm.begin(),
- ie = Asm.end(); it != ie; ++it) {
- const MCSectionData &SD = *it;
+ for (const MCSectionData &SD : Asm) {
const MCSectionELF &Section =
static_cast<const MCSectionELF &>(SD.getSection());
if (Section.getType() == ELF::SHT_GROUP ||
OpenPOWER on IntegriCloud