summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-17 19:44:07 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-17 19:44:07 +0000
commit16431fe7a7561b6332011ff6caca9bb34c1f03de (patch)
tree42e61e86a88536ff69d0e15d084dfe81d0c4b13c /llvm/lib
parentfbb104513ba7de25b74d71875328bf45c6f3277b (diff)
downloadbcm5719-llvm-16431fe7a7561b6332011ff6caca9bb34c1f03de.tar.gz
bcm5719-llvm-16431fe7a7561b6332011ff6caca9bb34c1f03de.zip
Add FILE_SHARE_WRITE to openFileForRead.
This should fix the windows bots. It looks like the failing tests are of the form prog1 > file prog2 file and prog2 fails trying to read the file. The best fix would probably be to close stdout/stderr in prog1, but it was not the intention of 186511 to change this, so just restore the old behavior for now. llvm-svn: 186530
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/Windows/Path.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 1da60d67118..d51332ef81c 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -1050,7 +1050,7 @@ error_code openFileForRead(const Twine &Name, int &ResultFD) {
return EC;
HANDLE H = ::CreateFileW(PathUTF16.begin(), GENERIC_READ,
- FILE_SHARE_READ, NULL,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (H == INVALID_HANDLE_VALUE) {
error_code EC = windows_error(::GetLastError());
OpenPOWER on IntegriCloud