diff options
author | Pete Cooper <peter_cooper@apple.com> | 2015-07-24 21:13:43 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2015-07-24 21:13:43 +0000 |
commit | 7679afda82bb2401fe12f1a5d6c55876cfa8d04c (patch) | |
tree | 311a323dd1780c8e315e8da55eb90ff046efada2 /llvm/lib/CodeGen/AsmPrinter/ARMException.cpp | |
parent | 16bc6e172700bc61c979d37427f5f8a308ea6166 (diff) | |
download | bcm5719-llvm-7679afda82bb2401fe12f1a5d6c55876cfa8d04c.tar.gz bcm5719-llvm-7679afda82bb2401fe12f1a5d6c55876cfa8d04c.zip |
Use make_range(rbegin(), rend()) to allow foreach loops. NFC.
Instead of the pattern
for (auto I = x.rbegin(), E = x.end(); I != E; ++I)
we can use make_range to construct the reverse range and iterate using
that instead.
llvm-svn: 243163
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/ARMException.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/ARMException.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp b/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp index 0bad7954b98..5f91763f27b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp @@ -115,9 +115,8 @@ void ARMException::emitTypeInfos(unsigned TTypeEncoding) { Entry = TypeInfos.size(); } - for (std::vector<const GlobalValue *>::const_reverse_iterator - I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I) { - const GlobalValue *GV = *I; + for (const GlobalValue *GV : make_range(TypeInfos.rbegin(), + TypeInfos.rend())) { if (VerboseAsm) Asm->OutStreamer->AddComment("TypeInfo " + Twine(Entry--)); Asm->EmitTTypeReference(GV, TTypeEncoding); |