Skip to content

Commit

Permalink
Use range loop. NFC.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242801 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
espindola committed Jul 21, 2015
1 parent 7eeb71d commit 51ac821
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/obj2yaml/elf2yaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,17 @@ ErrorOr<ELFYAML::Object *> ELFDumper<ELFT>::dump() {

// Dump symbols
bool IsFirstSym = true;
for (auto SI = Obj.symbol_begin(), SE = Obj.symbol_end(); SI != SE; ++SI) {
for (const Elf_Sym &Sym : Obj.symbols()) {
if (IsFirstSym) {
IsFirstSym = false;
continue;
}

ELFYAML::Symbol S;
if (std::error_code EC = ELFDumper<ELFT>::dumpSymbol(SI, false, S))
if (std::error_code EC = ELFDumper<ELFT>::dumpSymbol(&Sym, false, S))
return EC;

switch (SI->getBinding())
switch (Sym.getBinding())
{
case ELF::STB_LOCAL:
Y->Symbols.Local.push_back(S);
Expand Down

0 comments on commit 51ac821

Please sign in to comment.