summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2005-02-20 02:48:51 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2005-02-20 02:48:51 +0000
commit18cf7ebcee1c81f5325d3c7b1af94108e0462515 (patch)
tree34e74e3566c0cc92f37e61335ff3169010defc60 /llvm/lib
parent4220bf5726a19b915f5acd5dae2b23e71df19ec9 (diff)
downloadbcm5719-llvm-18cf7ebcee1c81f5325d3c7b1af94108e0462515.tar.gz
bcm5719-llvm-18cf7ebcee1c81f5325d3c7b1af94108e0462515.zip
Fix silly mistake.
llvm-svn: 20256
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/System/Win32/Program.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/System/Win32/Program.inc b/llvm/lib/System/Win32/Program.inc
index 67965d1b694..4c520918bd1 100644
--- a/llvm/lib/System/Win32/Program.inc
+++ b/llvm/lib/System/Win32/Program.inc
@@ -86,7 +86,7 @@ static HANDLE RedirectIO(const Path *path, int fd) {
sa.bInheritHandle = TRUE;
h = CreateFile(fname, fd ? GENERIC_WRITE : GENERIC_READ, FILE_SHARE_READ,
- &sa, fd ? OPEN_EXISTING : CREATE_ALWAYS,
+ &sa, fd == 0 ? OPEN_EXISTING : CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE) {
ThrowError(std::string(fname) + ": Can't open file for " +
OpenPOWER on IntegriCloud