[PATCH] D82542: [Support][Windows] Prevent 2s delay when renaming a file that does not exist
ben via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 03:46:35 PDT 2020
bd1976llvm marked 2 inline comments as done.
bd1976llvm added inline comments.
================
Comment at: llvm/lib/Support/Windows/Path.inc:562
+ if (EC == errc::no_such_file_or_directory)
+ break;
}
----------------
amccarth wrote:
> I would probably just `return` the error here rather than `break`.
>
> When you break, you end up calling `GetLastError()` again. While that's probably safe, a small future change could end perturb that last error code.
>
>
Clearly better. Thanks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82542/new/
https://reviews.llvm.org/D82542
More information about the llvm-commits
mailing list