From a75173cb9e33ae86648f3ca652e38777328b2be1 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 5 May 2014 20:06:41 +0000 Subject: [PATCH] Use a range loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207996 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/LTO/LTOCodeGenerator.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp index 1dd0721493d..028c1912717 100644 --- a/lib/LTO/LTOCodeGenerator.cpp +++ b/lib/LTO/LTOCodeGenerator.cpp @@ -429,9 +429,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { if (!AsmUsed.empty()) { llvm::Type *i8PTy = llvm::Type::getInt8PtrTy(Context); std::vector asmUsed2; - for (SmallPtrSet::const_iterator i = AsmUsed.begin(), - e = AsmUsed.end(); i !=e; ++i) { - GlobalValue *GV = *i; + for (auto *GV : AsmUsed) { Constant *c = ConstantExpr::getBitCast(GV, i8PTy); asmUsed2.push_back(c); }