The variable used to need the wider scope, but doesn't after the
reland. See LC_LINKER_OPTIONS-related discussion on
https://reviews.llvm.org/D104353 for background.
// We don't take a reference to cachedFile here because the
// loadArchiveMember() call below may recursively call addFile() and
// invalidate this reference.
- ArchiveFile *cachedFile = loadedArchives[path];
- if (cachedFile)
+ if (ArchiveFile *cachedFile = loadedArchives[path])
return cachedFile;
std::unique_ptr<object::Archive> file = CHECK(