summaryrefslogtreecommitdiffstats
path: root/test/PCH
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-03-21 10:50:08 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-03-21 10:50:08 +0000
commit1e255aab650a7fa2047fd953cae65b12215280af (patch)
tree508d4388db78f87d35bf26a0400b4b03bc4c1f13 /test/PCH
parent1033b7c1e32962948b01a25145829f17bc70a8de (diff)
downloadFreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.zip
FreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.tar.gz
Update clang to r99115.
Diffstat (limited to 'test/PCH')
-rw-r--r--test/PCH/changed-files.c31
-rw-r--r--test/PCH/headermap.h3
-rw-r--r--test/PCH/headermap.m15
3 files changed, 41 insertions, 8 deletions
diff --git a/test/PCH/changed-files.c b/test/PCH/changed-files.c
index 36453c4..dd08bdd 100644
--- a/test/PCH/changed-files.c
+++ b/test/PCH/changed-files.c
@@ -1,11 +1,26 @@
const char *s0 = m0;
+int s1 = m1;
+const char *s2 = m0;
-// RUN: echo '#define m0 ""' > %t.h
-// RUN: %clang_cc1 -emit-pch -o %t.h.pch %t.h
-// RUN: echo '' > %t.h
-// RUN: not %clang_cc1 -include-pch %t.h.pch %s 2>&1 | grep "size of file"
+// FIXME: This test fails inexplicably on Windows in a manner that makes it
+// look like standard error isn't getting flushed properly.
-// RUN: echo '#define m0 000' > %t.h
-// RUN: %clang_cc1 -emit-pch -o %t.h.pch %t.h
-// RUN: echo '' > %t.h
-// RUN: not %clang_cc1 -include-pch %t.h.pch %s 2>&1 | grep "size of file"
+// RUN: true
+// RUNx: echo '#define m0 ""' > %t.h
+// RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h
+// RUNx: echo '' > %t.h
+// RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr
+// RUNx: grep "modified" %t.stderr
+
+// RUNx: echo '#define m0 000' > %t.h
+// RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h
+// RUNx: echo '' > %t.h
+// RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr
+// RUNx: grep "modified" %t.stderr
+
+// RUNx: echo '#define m0 000' > %t.h
+// RUNx: echo "#define m1 'abcd'" >> %t.h
+// RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h
+// RUNx: echo '' > %t.h
+// RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr
+// RUNx: grep "modified" %t.stderr
diff --git a/test/PCH/headermap.h b/test/PCH/headermap.h
new file mode 100644
index 0000000..efab2d8
--- /dev/null
+++ b/test/PCH/headermap.h
@@ -0,0 +1,3 @@
+/* Helper for the headermap.m test */
+int x = 17;
+
diff --git a/test/PCH/headermap.m b/test/PCH/headermap.m
new file mode 100644
index 0000000..6ba83d7
--- /dev/null
+++ b/test/PCH/headermap.m
@@ -0,0 +1,15 @@
+// RUN: touch %t.hmap
+
+// RUN: %clang_cc1 -x objective-c -emit-pch -o %t.h.pch %S/headermap.h
+// RUN: %clang_cc1 -include-pch %t.h.pch %s
+
+// RUN: %clang_cc1 -x objective-c -emit-pch -o %t.h.pch %S/headermap.h
+// RUN: %clang_cc1 -include-pch %t.h.pch -I%t.hmap %s
+
+// RUN: %clang_cc1 -x objective-c -I%t.hmap -emit-pch -o %t.h.pch %S/headermap.h
+// RUN: %clang_cc1 -include-pch %t.h.pch %s
+
+// RUN: %clang_cc1 -x objective-c -I%t.hmap -emit-pch -o %t.h.pch %S/headermap.h
+// RUN: %clang_cc1 -include-pch %t.h.pch -I%t.hmap %s
+#import "headermap.h"
+
OpenPOWER on IntegriCloud