diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-07-28 21:38:49 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-07-28 21:38:49 +0000 |
commit | a9f2368a4016901b5e2ed109b1eead2835ca8242 (patch) | |
tree | 38f3a422c1fc77730d36f729c7b18f2e22a7c1d7 /test | |
parent | b86238d2f0a93ce91717906f9211927f48a7121a (diff) |
Support extended vector types in chained PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/PCH/Inputs/chain-ext_vector1.h | 3 | ||||
-rw-r--r-- | test/PCH/Inputs/chain-ext_vector2.h | 3 | ||||
-rw-r--r-- | test/PCH/chain-ext_vector.c | 11 |
3 files changed, 17 insertions, 0 deletions
diff --git a/test/PCH/Inputs/chain-ext_vector1.h b/test/PCH/Inputs/chain-ext_vector1.h new file mode 100644 index 0000000000..51093364c9 --- /dev/null +++ b/test/PCH/Inputs/chain-ext_vector1.h @@ -0,0 +1,3 @@ +// First header file for chain-ext_vector.c PCH test + +typedef __attribute__((ext_vector_type(2))) float float2; diff --git a/test/PCH/Inputs/chain-ext_vector2.h b/test/PCH/Inputs/chain-ext_vector2.h new file mode 100644 index 0000000000..bdaeccc130 --- /dev/null +++ b/test/PCH/Inputs/chain-ext_vector2.h @@ -0,0 +1,3 @@ +// Second header file for chain-ext_vector.c PCH test + +typedef __attribute__((ext_vector_type(4))) float float4; diff --git a/test/PCH/chain-ext_vector.c b/test/PCH/chain-ext_vector.c new file mode 100644 index 0000000000..263507003d --- /dev/null +++ b/test/PCH/chain-ext_vector.c @@ -0,0 +1,11 @@ +// Test this without pch. +// RUN: %clang_cc1 -include %S/Inputs/chain-ext_vector1.h -include %S/Inputs/chain-ext_vector2.h -fsyntax-only -verify %s + +// Test with pch. +// RUN: %clang_cc1 -emit-pch -o %t1 %S/Inputs/chain-ext_vector1.h +// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-ext_vector2.h -include-pch %t1 -chained-pch +// RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s + +int test(float4 f4) { + return f4.xy; // expected-error{{float2}} +} |