[PATCH] [C++11] Introduce ObjectFile::symbols() to use range-based loops.

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Fri Mar 14 09:08:54 PDT 2014


  LGTM with one nit.


================
Comment at: tools/macho-dump/macho-dump.cpp:214
@@ -214,3 +213,3 @@
       MachO::nlist STE = Obj.getSymbolTableEntry(DRI);
-      DumpSymbolTableEntryData(Obj, SymNum, STE.n_strx, STE.n_type,
+      DumpSymbolTableEntryData(Obj, SymNum++, STE.n_strx, STE.n_type,
                                STE.n_sect, STE.n_desc, STE.n_value,
----------------
Please factor the ++ to the end of the loop, so SymNum is only incremented in one place.


http://llvm-reviews.chandlerc.com/D3081

BRANCH
  svn

ARCANIST PROJECT
  llvm



More information about the llvm-commits mailing list