[llvm] r242801 - Use range loop. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jul 21 09:40:14 PDT 2015
Author: rafael
Date: Tue Jul 21 11:40:14 2015
New Revision: 242801
URL: http://llvm.org/viewvc/llvm-project?rev=242801&view=rev
Log:
Use range loop. NFC.
Modified:
llvm/trunk/tools/obj2yaml/elf2yaml.cpp
Modified: llvm/trunk/tools/obj2yaml/elf2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/elf2yaml.cpp?rev=242801&r1=242800&r2=242801&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/elf2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/elf2yaml.cpp Tue Jul 21 11:40:14 2015
@@ -123,17 +123,17 @@ ErrorOr<ELFYAML::Object *> ELFDumper<ELF
// 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);
More information about the llvm-commits
mailing list