[llvm] r214530 - Use range loop.
Rafael Espindola
rafael.espindola at gmail.com
Fri Aug 1 11:04:14 PDT 2014
Author: rafael
Date: Fri Aug 1 13:04:14 2014
New Revision: 214530
URL: http://llvm.org/viewvc/llvm-project?rev=214530&view=rev
Log:
Use range loop.
Modified:
llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp
Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp?rev=214530&r1=214529&r2=214530&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp Fri Aug 1 13:04:14 2014
@@ -88,11 +88,9 @@ MCJIT::~MCJIT() {
LoadedObjects.clear();
- SmallVector<object::Archive *, 2>::iterator ArIt, ArEnd;
- for (ArIt = Archives.begin(), ArEnd = Archives.end(); ArIt != ArEnd; ++ArIt) {
- object::Archive *A = *ArIt;
+ for (object::Archive *A : Archives)
delete A;
- }
+
Archives.clear();
delete TM;
@@ -296,9 +294,7 @@ uint64_t MCJIT::getSymbolAddress(const s
if (Addr)
return Addr;
- SmallVector<object::Archive*, 2>::iterator I, E;
- for (I = Archives.begin(), E = Archives.end(); I != E; ++I) {
- object::Archive *A = *I;
+ for (object::Archive *A : Archives) {
// Look for our symbols in each Archive
object::Archive::child_iterator ChildIt = A->findSym(Name);
if (ChildIt != A->child_end()) {
More information about the llvm-commits
mailing list