summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ELFWriter.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-07-17 18:02:30 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-07-17 18:02:30 +0000
commit0cded73755766aa4087c6b9f9b9ea2de8ea01424 (patch)
tree93f41bc184ed00647378aa9d1255dfcbef9cd6f7 /llvm/lib/CodeGen/ELFWriter.cpp
parent8a286fbdb9618d6faea3f6a6c6b9efe370c73dc3 (diff)
downloadbcm5719-llvm-0cded73755766aa4087c6b9f9b9ea2de8ea01424.tar.gz
bcm5719-llvm-0cded73755766aa4087c6b9f9b9ea2de8ea01424.zip
revert one of the loops to use indicies over iterators because there are vector insertions inside the loop
llvm-svn: 76195
Diffstat (limited to 'llvm/lib/CodeGen/ELFWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/ELFWriter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp
index 7961db80406..3e1645b2c34 100644
--- a/llvm/lib/CodeGen/ELFWriter.cpp
+++ b/llvm/lib/CodeGen/ELFWriter.cpp
@@ -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);
OpenPOWER on IntegriCloud