forked from OSchip/llvm-project
[llvm-nm] Prefer range-based loop over explicit iterator.
llvm-svn: 260459
This commit is contained in:
parent
2476e0027e
commit
9ee9fb6571
llvm/tools/llvm-nm
|
@ -877,9 +877,8 @@ static char getNMTypeChar(SymbolicFile &Obj, basic_symbol_iterator I) {
|
||||||
// file or zero it is not present.
|
// file or zero it is not present.
|
||||||
static unsigned getNsectForSegSect(MachOObjectFile *Obj) {
|
static unsigned getNsectForSegSect(MachOObjectFile *Obj) {
|
||||||
unsigned Nsect = 1;
|
unsigned Nsect = 1;
|
||||||
for (section_iterator I = Obj->section_begin(), E = Obj->section_end();
|
for (auto &S : Obj->sections()) {
|
||||||
I != E; ++I) {
|
DataRefImpl Ref = S.getRawDataRefImpl();
|
||||||
DataRefImpl Ref = I->getRawDataRefImpl();
|
|
||||||
StringRef SectionName;
|
StringRef SectionName;
|
||||||
Obj->getSectionName(Ref, SectionName);
|
Obj->getSectionName(Ref, SectionName);
|
||||||
StringRef SegmentName = Obj->getSectionFinalSegmentName(Ref);
|
StringRef SegmentName = Obj->getSectionFinalSegmentName(Ref);
|
||||||
|
|
Loading…
Reference in New Issue