Move a local variable into while-loop scope.

llvm-svn: 192260
This commit is contained in:
Rui Ueyama 2013-10-09 00:42:57 +00:00
parent b1c6c489ca
commit 1c1b443997
1 changed files with 1 additions and 2 deletions

View File

@ -290,9 +290,8 @@ void Resolver::addAtoms(const std::vector<const DefinedAtom*>& newAtoms) {
// if so, keep searching libraries until no more atoms being added // if so, keep searching libraries until no more atoms being added
void Resolver::resolveUndefines() { void Resolver::resolveUndefines() {
ScopedTask task(getDefaultDomain(), "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) if (error_code(nextFile) == input_graph_error::no_more_files)
break; break;
if (nextFile->kind() == File::kindObject) if (nextFile->kind() == File::kindObject)