[llvm] r234611 - [FS] Report errors from llvm::sys::fs::rename on Windows
Rafael EspĂndola
rafael.espindola at gmail.com
Sun Apr 12 05:14:50 PDT 2015
BTW, do you think we can drop the sleep?
On Apr 10, 2015 1:26 PM, "Reid Kleckner" <reid at kleckner.net> wrote:
> Author: rnk
> Date: Fri Apr 10 12:20:45 2015
> New Revision: 234611
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234611&view=rev
> Log:
> [FS] Report errors from llvm::sys::fs::rename on Windows
>
> Previously we would always report success, which is pretty bogus.
>
> I'm too lazy to write a test where rename will portably fail on all
> platforms. I'm just trying to fix breakage introduced by r234597, which
> happened to tickle this.
>
> Modified:
> llvm/trunk/lib/Support/Windows/Path.inc
>
> Modified: llvm/trunk/lib/Support/Windows/Path.inc
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=234611&r1=234610&r2=234611&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Support/Windows/Path.inc (original)
> +++ llvm/trunk/lib/Support/Windows/Path.inc Fri Apr 10 12:20:45 2015
> @@ -261,6 +261,7 @@ std::error_code rename(const Twine &from
> MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING))
> return std::error_code();
> DWORD LastError = ::GetLastError();
> + ec = windows_error(LastError);
> if (LastError != ERROR_ACCESS_DENIED)
> break;
> // Retry MoveFile() at ACCESS_DENIED.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150412/8ce8936f/attachment.html>
More information about the llvm-commits
mailing list