revert one of the loops to use indicies over iterators because there are vector inser...
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 17 Jul 2009 18:02:30 +0000 (18:02 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 17 Jul 2009 18:02:30 +0000 (18:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76195 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ELFWriter.cpp

index 7961db8040674ea2bf8c6284328281a07bc0c878..3e1645b2c341ef54b2dd29d6d642c79218662412 100644 (file)
@@ -456,8 +456,8 @@ bool ELFWriter::doFinalization(Module &M) {
 void ELFWriter::EmitRelocations() {
 
   // Create Relocation sections for each section which needs it.
-  for (ELFSectionIter I=SectionList.begin(), E=SectionList.end(); I != E; ++I) {
-    ELFSection &S = *(*I);
+  for (unsigned i=0, e=SectionList.size(); i != e; ++i) {
+    ELFSection &S = *SectionList[i];
 
     // This section does not have relocations
     if (!S.hasRelocations()) continue;
@@ -578,8 +578,7 @@ void ELFWriter::EmitStringTable() {
   // Set the zero'th symbol to a null byte, as required.
   StrTab.emitByte(0);
 
-  // Walk on the symbol list and write symbol names into the
-  // string table.
+  // Walk on the symbol list and write symbol names into the string table.
   unsigned Index = 1;
   for (ELFSymIter I=SymbolList.begin(), E=SymbolList.end(); I != E; ++I) {
     ELFSym &Sym = *(*I);