diff options
author | Steve Kondik <shade@chemlab.org> | 2013-02-12 22:30:54 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-02-12 22:30:54 -0800 |
commit | dc061bc9a5eb7ad462b78e5806088648b787dbee (patch) | |
tree | 92cbf6ed20078148572c5beec0833f61c0fc296b | |
parent | 5fe50819a621ce7d0f3ac701459498eeab5a23d6 (diff) | |
parent | f7f66c5cfa9e6f7dd56edd3e30d95d64bcd22c17 (diff) | |
download | android_frameworks_compile_slang-cm-10.1.0-RC2.tar.gz android_frameworks_compile_slang-cm-10.1.0-RC2.tar.bz2 android_frameworks_compile_slang-cm-10.1.0-RC2.zip |
Merge tag 'android-4.2.2_r1' of https://android.googlesource.com/platform/frameworks/compile/slang into 1.1cm-10.1.2cm-10.1.1cm-10.1.0-RC5cm-10.1.0-RC4cm-10.1.0-RC3cm-10.1.0-RC2cm-10.1.0-RC1cm-10.1.0cm-10.1-M3cm-10.1-M2mr1.1-staging
Android 4.2.2 release 1
-rw-r--r-- | slang_rs_export_type.cpp | 4 | ||||
-rw-r--r-- | tests/P_static_struct/static_struct.rs | 11 | ||||
-rw-r--r-- | tests/P_static_struct/stderr.txt.expect | 0 | ||||
-rw-r--r-- | tests/P_static_struct/stdout.txt.expect | 1 |
4 files changed, 15 insertions, 1 deletions
diff --git a/slang_rs_export_type.cpp b/slang_rs_export_type.cpp index 94bd6bb..ae13bf6 100644 --- a/slang_rs_export_type.cpp +++ b/slang_rs_export_type.cpp @@ -512,7 +512,9 @@ static bool ValidateTypeHelper( const clang::Type *ElementType = GET_EXT_VECTOR_ELEMENT_TYPE(EVT); if (TargetAPI < SLANG_ICS_TARGET_API && InCompositeType && - EVT->getNumElements() == 3) { + EVT->getNumElements() == 3 && + ND && + ND->getLinkage() == clang::ExternalLinkage) { ReportTypeError(&C.getDiagnostics(), ND, NULL, "structs containing vectors of dimension 3 cannot " "be exported at this API level: '%0'"); diff --git a/tests/P_static_struct/static_struct.rs b/tests/P_static_struct/static_struct.rs new file mode 100644 index 0000000..0b3e9ec --- /dev/null +++ b/tests/P_static_struct/static_struct.rs @@ -0,0 +1,11 @@ +// -target-api 12 +#pragma version(1) +#pragma rs java_package_name(com.example); + +typedef struct Plane_s { + float3 point; +} Plane; + +static Plane carouselPlane = { + { 0.0f, 0.0f, 0.0f } +}; diff --git a/tests/P_static_struct/stderr.txt.expect b/tests/P_static_struct/stderr.txt.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/P_static_struct/stderr.txt.expect diff --git a/tests/P_static_struct/stdout.txt.expect b/tests/P_static_struct/stdout.txt.expect new file mode 100644 index 0000000..9bf4e1c --- /dev/null +++ b/tests/P_static_struct/stdout.txt.expect @@ -0,0 +1 @@ +Generating ScriptC_static_struct.java ... |