diff options
author | Zachary Turner <zturner@google.com> | 2017-03-10 18:33:41 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-03-10 18:33:41 +0000 |
commit | 3c0dc3360075de6bcdd2de9b19ca0879ebb6980d (patch) | |
tree | 9fb1773165e36f49e5f48ab2099a3e46f0e5b196 /llvm/lib/Support/Windows/Path.inc | |
parent | 9dd49054fa55696004bccc6e8babb76b9d7c13c4 (diff) | |
download | bcm5719-llvm-3c0dc3360075de6bcdd2de9b19ca0879ebb6980d.tar.gz bcm5719-llvm-3c0dc3360075de6bcdd2de9b19ca0879ebb6980d.zip |
[Support] Don't return an error if realPath fails.
In openFileForRead, we would not previously return an error
if real_path resolution failed. After a recent patch, we
started propagating this error up. This caused a failure
in clang when trying to call openFileForRead("nul"). This
patch restores the previous behavior of not propagating this
error up.
llvm-svn: 297488
Diffstat (limited to 'llvm/lib/Support/Windows/Path.inc')
-rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index c7582894fa9..d8a14b41cb2 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -857,12 +857,11 @@ std::error_code openFileForRead(const Twine &Name, int &ResultFD, } // Fetch the real name of the file, if the user asked - std::error_code EC; if (RealPath) - EC = realPathFromHandle(H, *RealPath); + realPathFromHandle(H, *RealPath); ResultFD = FD; - return EC; + return std::error_code(); } std::error_code openFileForWrite(const Twine &Name, int &ResultFD, |