diff options
author | Justin Bogner <mail@justinbogner.com> | 2014-10-03 01:04:53 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2014-10-03 01:04:53 +0000 |
commit | aab9792b6c46b07f4f2caee1778f619387781e0c (patch) | |
tree | c72a7311cfbed171e17167e2cd834d94d2f08287 /clang/lib/Driver/Job.cpp | |
parent | e83f59e6580e12f1af705ce47425cd954ef1ad7c (diff) | |
download | bcm5719-llvm-aab9792b6c46b07f4f2caee1778f619387781e0c.tar.gz bcm5719-llvm-aab9792b6c46b07f4f2caee1778f619387781e0c.zip |
Driver: Use pointee_iterator rather than iterating over unique_ptrs
There's probably never a good reason to iterate over unique_ptrs. This
lets us use range-for and say Job.foo instead of (*it)->foo in a few
places.
llvm-svn: 218938
Diffstat (limited to 'clang/lib/Driver/Job.cpp')
-rw-r--r-- | clang/lib/Driver/Job.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Driver/Job.cpp b/clang/lib/Driver/Job.cpp index 1202c997b5e..c13b56e1be8 100644 --- a/clang/lib/Driver/Job.cpp +++ b/clang/lib/Driver/Job.cpp @@ -287,8 +287,8 @@ JobList::JobList() : Job(JobListClass) {} void JobList::Print(raw_ostream &OS, const char *Terminator, bool Quote, bool CrashReport) const { - for (const_iterator it = begin(), ie = end(); it != ie; ++it) - (*it)->Print(OS, Terminator, Quote, CrashReport); + for (const auto &Job : *this) + Job.Print(OS, Terminator, Quote, CrashReport); } void JobList::clear() { Jobs.clear(); } |