From f240e528cea25fd2a9ae01b1e1fe77f507ed7a2c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 29 Nov 2021 09:04:44 -0800 Subject: [llvm] Use range-based for loops (NFC) --- llvm/lib/Object/ELFObjectFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Object/ELFObjectFile.cpp') diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index 50035d6..cf1f12d 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -682,7 +682,7 @@ readDynsymVersionsImpl(const ELFFile &EF, std::vector Ret; size_t I = 0; - for (auto It = Symbols.begin(), E = Symbols.end(); It != E; ++It) { + for (const ELFSymbolRef &Sym : Symbols) { ++I; Expected VerEntryOrErr = EF.template getEntry(*VerSec, I); @@ -691,7 +691,7 @@ readDynsymVersionsImpl(const ELFFile &EF, " from " + describe(EF, *VerSec) + ": " + toString(VerEntryOrErr.takeError())); - Expected FlagsOrErr = It->getFlags(); + Expected FlagsOrErr = Sym.getFlags(); if (!FlagsOrErr) return createError("unable to read flags for symbol with index " + Twine(I) + ": " + toString(FlagsOrErr.takeError())); -- cgit v1.1