summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-27 20:06:05 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-27 20:06:05 +0000
commit61cac2b2954cf20760b609fc3efd1c976183cf9b (patch)
tree35b64be37e76f68f79065e2f6a733e1f7c3164e8 /clang/test
parent0e3f50d8cf054c84c8ac95f7cab20996f985056f (diff)
downloadbcm5719-llvm-61cac2b2954cf20760b609fc3efd1c976183cf9b.tar.gz
bcm5719-llvm-61cac2b2954cf20760b609fc3efd1c976183cf9b.zip
Add Sema::ExtVectorDecls and Sema::ObjCCategoryImpls to the PCH file. Since these vectors are very, very rarely used and, when used in headers, and even when used are relatively small, we load them eagerly.
llvm-svn: 70240
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/PCH/ext_vector.c10
-rw-r--r--clang/test/PCH/ext_vector.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/PCH/ext_vector.c b/clang/test/PCH/ext_vector.c
new file mode 100644
index 00000000000..4b5c25980e5
--- /dev/null
+++ b/clang/test/PCH/ext_vector.c
@@ -0,0 +1,10 @@
+// Test this without pch.
+// RUN: clang-cc -include %S/ext_vector.h -fsyntax-only -verify %s &&
+
+// Test with pch.
+// RUN: clang-cc -emit-pch -o %t %S/ext_vector.h &&
+// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s
+
+int test(float4 f4) {
+ return f4.xy; // expected-error{{float2}}
+}
diff --git a/clang/test/PCH/ext_vector.h b/clang/test/PCH/ext_vector.h
new file mode 100644
index 00000000000..39ab9233584
--- /dev/null
+++ b/clang/test/PCH/ext_vector.h
@@ -0,0 +1,4 @@
+// Header file for ext_vector.c PCH test
+
+typedef __attribute__((ext_vector_type(2))) float float2;
+typedef __attribute__((ext_vector_type(4))) float float4;
OpenPOWER on IntegriCloud