[llvm] r257037 - Modernize to range-based loop
Michael Liao via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 6 23:58:25 PST 2016
Author: hliao
Date: Thu Jan 7 01:58:25 2016
New Revision: 257037
URL: http://llvm.org/viewvc/llvm-project?rev=257037&view=rev
Log:
Modernize to range-based loop
Modified:
llvm/trunk/utils/KillTheDoctor/KillTheDoctor.cpp
Modified: llvm/trunk/utils/KillTheDoctor/KillTheDoctor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/KillTheDoctor/KillTheDoctor.cpp?rev=257037&r1=257036&r2=257037&view=diff
==============================================================================
--- llvm/trunk/utils/KillTheDoctor/KillTheDoctor.cpp (original)
+++ llvm/trunk/utils/KillTheDoctor/KillTheDoctor.cpp Thu Jan 7 01:58:25 2016
@@ -328,11 +328,9 @@ int main(int argc, char **argv) {
if (TraceExecution)
errs() << ToolName << ": Found Program: " << ProgramToRun << '\n';
- for (std::vector<std::string>::iterator i = Argv.begin(),
- e = Argv.end();
- i != e; ++i) {
+ for (const std::string &Arg : Argv) {
CommandLine.push_back(' ');
- CommandLine.append(*i);
+ CommandLine.append(Arg);
}
if (TraceExecution)
More information about the llvm-commits
mailing list