summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2016-06-07 20:14:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2016-06-07 20:14:17 +0000
commit918a92881b6df5c23c2e436b8db252a808d96b67 (patch)
treecc8d3664e1bade931f226d919fc4d3c5bf0f6056 /llvm
parent8aa0d7332a89c15b64f679f0a543d6d2fa7075c8 (diff)
downloadbcm5719-llvm-918a92881b6df5c23c2e436b8db252a808d96b67.tar.gz
bcm5719-llvm-918a92881b6df5c23c2e436b8db252a808d96b67.zip
[lit] Fix an uninitialized var on Windows.
llvm-svn: 272052
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/lit/lit/TestRunner.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py
index f6dfd46604f..adf3d62e107 100644
--- a/llvm/utils/lit/lit/TestRunner.py
+++ b/llvm/utils/lit/lit/TestRunner.py
@@ -255,6 +255,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
result = subprocess.PIPE
else:
if r[2] is None:
+ redir_filename = None
if kAvoidDevNull and r[0] == '/dev/null':
r[2] = tempfile.TemporaryFile(mode=r[1])
elif kIsWindows and r[0] == '/dev/tty':
@@ -398,7 +399,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
# Gather the redirected output files.
output_files = []
for (name, mode, f, path) in sorted(opened_files):
- if mode in ('w', 'a'):
+ if path is not None and mode in ('w', 'a'):
try:
with open(path) as f:
data = f.read()
OpenPOWER on IntegriCloud