[PATCH] D152198: [lld][COFF] Don't handle an input file multiple times when retrying
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 16:33:39 PDT 2023
aeubanks added inline comments.
================
Comment at: lld/COFF/Driver.cpp:259
// winsysroot file.
if (std::optional<StringRef> retryPath = findFile(pathStr)) {
auto retryMb = MemoryBuffer::getFile(*retryPath, /*IsText=*/false,
----------------
rnk wrote:
> This is confusing, if the file really doesn't exist at all, won't findFile return none on the first attempt, and with your change, we will never report a file not found error? What happens, does findFile return the string without modification?
yeah, `findFile` is weird in that it only returns null when visiting a file more than once, not if the file is not found (where it just returns the path unmodified)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152198/new/
https://reviews.llvm.org/D152198
More information about the llvm-commits
mailing list