[lld] r192260 - Move a local variable into while-loop scope.

Rui Ueyama ruiu at google.com
Tue Oct 8 17:42:58 PDT 2013


Author: ruiu
Date: Tue Oct  8 19:42:57 2013
New Revision: 192260

URL: http://llvm.org/viewvc/llvm-project?rev=192260&view=rev
Log:
Move a local variable into while-loop scope.

Modified:
    lld/trunk/lib/Core/Resolver.cpp

Modified: lld/trunk/lib/Core/Resolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Resolver.cpp?rev=192260&r1=192259&r2=192260&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Tue Oct  8 19:42:57 2013
@@ -290,9 +290,8 @@ void Resolver::addAtoms(const std::vecto
 // if so, keep searching libraries until no more atoms being added
 void Resolver::resolveUndefines() {
   ScopedTask task(getDefaultDomain(), "resolveUndefines");
-  ErrorOr<File &> nextFile;
 
-  while ((nextFile = _context.nextFile())) {
+  while (ErrorOr<File &> nextFile = _context.nextFile()) {
     if (error_code(nextFile) == input_graph_error::no_more_files)
       break;
     if (nextFile->kind() == File::kindObject)





More information about the llvm-commits mailing list