summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-04-28 20:23:35 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-04-28 20:23:35 +0000
commitad3cfaaa20703dfed11945e26f7f9ca0afc06566 (patch)
tree74c66efb6abbd1a7c7d4ff480320486fc4e8fb62 /llvm/lib
parentb435d0f4395448620e3e15411e635c102d915a2e (diff)
downloadbcm5719-llvm-ad3cfaaa20703dfed11945e26f7f9ca0afc06566.tar.gz
bcm5719-llvm-ad3cfaaa20703dfed11945e26f7f9ca0afc06566.zip
Use range loops. NFC.
llvm-svn: 236028
Diffstat (limited to 'llvm/lib')
-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