Use range loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214530 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-08-01 18:04:14 +00:00
parent de97719d77
commit af30da42f9

View File

@ -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 std::string &Name,
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()) {