aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-12-13 21:54:51 -0800
committerKazu Hirata <kazu@google.com>2021-12-13 21:54:51 -0800
commit7787a8f1b7077d9efb53f5023fe044b70ad527b4 (patch)
tree40204583a664e1f9e791a1893f20b64690f52e48 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent3cda38796c2ab0255be14fecc88fdbbe090367c2 (diff)
downloadllvm-7787a8f1b7077d9efb53f5023fe044b70ad527b4.zip
llvm-7787a8f1b7077d9efb53f5023fe044b70ad527b4.tar.gz
llvm-7787a8f1b7077d9efb53f5023fe044b70ad527b4.tar.bz2
[llvm] Use llvm::reverse (NFC)
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 993cb1d..7df4788 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -6733,10 +6733,10 @@ llvm::getBitcodeFileContents(MemoryBufferRef Buffer) {
// not have its own string table. A bitcode file may have multiple
// string tables if it was created by binary concatenation, for example
// with "llvm-cat -b".
- for (auto I = F.Mods.rbegin(), E = F.Mods.rend(); I != E; ++I) {
- if (!I->Strtab.empty())
+ for (BitcodeModule &I : llvm::reverse(F.Mods)) {
+ if (!I.Strtab.empty())
break;
- I->Strtab = *Strtab;
+ I.Strtab = *Strtab;
}
// Similarly, the string table is used by every preceding symbol table;
// normally there will be just one unless the bitcode file was created