summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2014-04-29 20:19:13 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2014-04-29 20:19:13 +0000
commite653811af2e81ee8f719096b1fa3073b78407656 (patch)
tree1b6976d0ce3fa1d3c42f0b6d612659a3a07ba895
parenta12dae37d5ad6bb9ac4b40daf8975a7cd758fe2e (diff)
downloadbcm5719-llvm-e653811af2e81ee8f719096b1fa3073b78407656.tar.gz
bcm5719-llvm-e653811af2e81ee8f719096b1fa3073b78407656.zip
Add test case for revision 207575 to verify that on Windows, clang doesn't
crash with an assertion failure when 'nul' is passed in input. Modified clang/test/lit.py to add feature 'system-windows' if `platform.system()` returns 'Windows'. llvm-svn: 207576
-rw-r--r--clang/test/Frontend/windows-nul.c8
-rw-r--r--clang/test/lit.cfg3
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Frontend/windows-nul.c b/clang/test/Frontend/windows-nul.c
new file mode 100644
index 00000000000..9a7e3576290
--- /dev/null
+++ b/clang/test/Frontend/windows-nul.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -dM -E nul -o /dev/null
+
+// REQUIRES: system-windows
+
+// Verify that cc1 doesn't crash with an assertion failure
+// in MemoryBuffer.cpp due to an invalid file size reported
+// when the Windows 'nul' device is passed in input.
+
diff --git a/clang/test/lit.cfg b/clang/test/lit.cfg
index 66cec612a3f..954e550d60d 100644
--- a/clang/test/lit.cfg
+++ b/clang/test/lit.cfg
@@ -344,6 +344,9 @@ if not platform.system() in ['Windows'] or not execute_external:
# This is used by debuginfo-tests/*block*.m and debuginfo-tests/foreach.m.
if platform.system() in ['Darwin']:
config.available_features.add('system-darwin')
+elif platform.system() in ['Windows']:
+ # For tests that require Windows to run.
+ config.available_features.add('system-windows')
# ANSI escape sequences in non-dumb terminal
if platform.system() not in ['Windows']:
OpenPOWER on IntegriCloud