aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Update slang for LLVM merge to r183849.Stephen Hines2013-06-133-3/+3
| | | | | | | | s/getLinkage/getFormalLinkage Path.h -> PathV1.h Fix test output diagnostics related to pragma location Change-Id: I7ab5372e848494ac40f1284eb6f9accc18092ad7
* Remove dependence to python 2.4Tobias Grosser2013-06-111-1/+1
| | | | | | | python 2.4 is not available any more on my Gubuntu system. I also do not see a reason why to enforce python 2.4. Change-Id: I8ab6cd38ba0f163ef53eb64d52d833923c5070c2
* Support -O0 as well as -O 0 for option passing.Stephen Hines2013-05-173-0/+6
| | | | | | | | | Bug: 9022067 This is not the same as standard Clang, and I would prefer to deprecate the old way (with space), but the SDK build system will need some time to adapt. Change-Id: I872afe8db3db6745b5507176007c012d0c4da117
* Turn off "lax vector conversions".Stephen Hines2013-05-141-2/+2
| | | | | | | | | Bug: 7342914 This language option catches all the terrible implicit vector casts (but not the explicit vector casts) that we are trying to forbid. Change-Id: I7cd75326fc72e0c7c74b635c81d7263a257330dd
* Disallow implicit and explicit casts of vector types in llvm-rs-cc.Stephen Hines2013-05-083-0/+28
| | | | | | | | | | | | Bug: 7342914 Vector types are aggregates (just like structs), and casting of any type results in bitcasts being generated. This misbehaves when converting between things like float and int. Even more troublesome than explicit casts are implicit casts, which can arise from accidental arithmetic operations between two different vector types. Change-Id: If27a0f70d1da5f1773261a38e6b4572aeb976701
* Update tests for v19.Stephen Hines2013-05-062-2/+2
| | | | Change-Id: I490c9f5cd1043055a7f3c8a22c3262f8e47ecdfd
* Fix filename-escaping for Windows paths.Stephen Hines2013-03-263-0/+3
| | | | Change-Id: I0070d0f96093490c664545cd61a42137e374798f
* Fix rs_matrix destructor issue.Stephen Hines2013-01-072-0/+7
| | | | | | | | | | | | | Bug: 7949301 This change fixes the destructor issue for rs_matrix types. We need to skip creating a destructor if there are no reference-counted RS object types in the struct. We still need to zero-init all RS object types (ref-counted or not, as is the case for rs_matrix*). I also fix another issue where a missing struct definition could cause an early parser crash (i.e. before the standard clang errors kick in and notice that you are using an undefined struct). Change-Id: If2009d96f35a8cb693431aaeae3cb4b5642695fa
* Update API (RS_VERSION) to 18.Stephen Hines2012-12-122-2/+2
| | | | | | | | | Doing version numbering based on the platform build is unstable and still prone to breakage. This way, we can always update the tests immediately, instead of just seeing them fail some random day when someone bumps the platform version. Change-Id: Ifde36eb63cbb546c0fed691ea573f2360b1dff40
* Merge "Add tests for Target API 17."Stephen Hines2012-12-114-0/+22
|\
| * Add tests for Target API 17.Stephen Hines2012-12-074-0/+22
| | | | | | | | Change-Id: Ib35780001929655c21a24c4a0c78ef1a5eb27137
* | Forbid non-const static variables in kernels.Stephen Hines2012-12-103-0/+22
|/ | | | | Bug: 7688011 Change-Id: If03084a9ece76478e0ed0847b75f09c41b89a500
* Merge "Fix C++ ForEach reflection (bad usrData args)."Stephen Hines2012-11-302-1/+4
|\
| * Fix C++ ForEach reflection (bad usrData args).Stephen Hines2012-11-272-1/+4
| | | | | | | | | | | | | | | | | | | | This fixes issues with the following areas: 1) usrData arguments to kernels. 2) set vs. bind for export variables. 3) improved argument handling for kernels/invoke. Bug: 5972398 Change-Id: I09a7b9198c45ab6e2d10b2abae1727ee0e559736
* | am af35c8e6: Merge "Fix overly strict check for float3 in structures."Stephen Hines2012-11-293-0/+12
|\ \ | |/ |/| | | | | * commit 'af35c8e6ad053bc5f2323ebbda3c347cb7d79414': Fix overly strict check for float3 in structures.
| * Fix overly strict check for float3 in structures.Stephen Hines2012-11-283-0/+12
| | | | | | | | | | | | | | | | We were accidentally being too strict and generating an error for float3 in structures, even when they were not exported. This change restores the original functionality. Change-Id: I8f0b5881d670c37a23ca2efc575440a083befcbe
* | Emit out parameter in C++ reflection for kernels.Stephen Hines2012-11-133-0/+19
|/ | | | Change-Id: I58a819e8b3640836011bd10640735070248b3fb5
* Validate FS (and RS) ASTs.Stephen Hines2012-10-1115-0/+141
| | | | | | | | | | | | | This change adds a new RSCheckAST class that is used to handle validation of the final AST. The checks include existing RS checks (for accepted types) and new checks for Filterscript (like disallowing pointers, unions and > 32 bit types completely). The refactoring also fixes a subtle union bug that existed in prior versions of llvm-rs-cc. We also add an implicit pragma for "rs_fp_relaxed" by default on Filterscript. Bug: 7166741 Change-Id: Ia077783b4caba0bbd89df2ab3827e9f4d1009eea
* Fix teardown bug for multiple files without pragma.Stephen Hines2012-10-114-0/+7
| | | | | | | | | This previously caused a segmentation fault in llvm-rs-cc. We were improperly using the DiagnosticsEngine after we had reset() everything. Bug: 7202787 Change-Id: Ic8522566ef257e70f16caf34b89f6a8e012908c5
* Support for pass-by-value kernels.Stephen Hines2012-09-1918-0/+71
| | | | | | | | | | | | This change allows the JB-mr1+ target API to declare compute kernels using "__attribute__((kernel))". This disables the use of pointers in the function signature and forces any output to be explicitly returned and input to be passed only by value. We still allow the user to add x, y coordinates if they want them. Bug: 7166741 Change-Id: I1407fceefb11c7d6c17221ca156cfce443c2b218
* Structs containing vectors of dimension 3 cannot be exported before ICS.Stephen Hines2012-08-313-0/+11
| | | | | | | | | | | | BUG=5609007 BUG=34600 (http://code.google.com/p/android/issues/detail?id=34600) We forbid the use of things like float3 in exported structures for older target APIs, because it results in a runtime exception every time. This is due to not padding the elements appropriately on the driver-side, while the LLVM representation is padded. Change-Id: I297af3418e733f0ab3996999be4a8f746f24da40
* Add RS-specific check forbidding array parameters in exported functions.Stephen Hines2012-08-041-1/+1
| | | | | | BUG=6902660 Change-Id: I31f0f2b51026edf450e920a5dd49810f4b191eb0
* Add RS package name option + support.Stephen Hines2012-08-033-0/+5
| | | | | | | | | | | | | Usage: llvm-rs-cc -rs-package-name=android.renderscript ... or llvm-rs-cc -rs-package-name android.renderscript ... This allows us to reflect a different import path for our base RS classes. The default value is "android.renderscript", resulting in a reflection that produces "import android.renderscript.*;". Change-Id: Icf7e83b963ba70c803899697f49b41fdfb9586e7
* Add test for constant array arguments to functions.Stephen Hines2012-08-013-0/+10
| | | | | | BUG=6902660 Change-Id: Ie4766fd6fe51eb4f6b195c91d44f27c3f6b83458
* Update llvm-rs-cc version information for JB-MR1.Stephen Hines2012-08-012-2/+2
| | | | Change-Id: I30e4212d7a5553534fae49be451d335de79bfcf3
* Multiple levels of pointers cannot be exported.Stephen Hines2012-04-114-1/+2
| | | | Change-Id: I533d26827fa650a481df65b2e20ac6dbc3559244
* Generate an error when exporting RS objects in structs/arrays.Stephen Hines2012-04-053-0/+22
| | | | | | | | | | | | | BUG=6009244 Note that this error triggers when the following conditions are met: 1) We are running with a pre-JB target API. 2) We detect an RS object type inside another composite (struct/array) type. 3) The variable is going to be exported (i.e. non-static). 4) The variable must also be of a non-pointer type, since pointers only reflect a bind() routine that does not use FieldPacker. Change-Id: Id7ca47a4affed2a8774d1c9644e11d4ab02ff27f
* Revert "Generate an error for exporting rs_objects in structs/arrays."Stephen Hines2012-04-043-18/+0
| | | This reverts commit f5abb503e67587ad89bcec99ed925d4a75448dcd
* Generate an error for exporting rs_objects in structs/arrays.Stephen Hines2012-04-033-0/+18
| | | | | | | | | BUG=6009244 This is only an error in pre-JB builds that can't support proper ref-counting within a FieldPacker. Change-Id: Ib96b5ec2befa48ec44890391e518ad557e9a9117
* Update include path for slang testing.Stephen Hines2012-04-021-1/+1
| | | | Change-Id: I35c544cd493dcea057f99c5bb6c5afd80861cfb1
* Fix up pragma handling.Stephen Hines2012-03-279-0/+27
| | | | | | | | | | BUG=4540719 This change allows us to handle pragmas with only keys (no values), like our new rs_fp_relaxed/rs_fp_imprecise. It also cleans up some diagnostic issues with pragmas in llvm-rs-cc. Change-Id: Ide54208db96f1cea71c5db6b3729ac4d241deda4
* More cleanup for reflection code.Stephen Hines2012-03-083-0/+33
| | | | | | | | | | BUG=5972398 1) Remove non-USER export kinds. 2) Removing some DataKind references. 3) More name refactoring to use getRSReflectionType(). Change-Id: I008aeb37820df37acea0db9300ff9594a40cb086
* Support dummy root() and re-ordering in presence of non-root kernels.Stephen Hines2012-02-226-0/+20
| | | | | | BUG=6000538 Change-Id: Ib3ed249916d36acf68ab32e9216804ae1da5e991
* Export ForEach on non-root functions.Stephen Hines2012-02-2214-21/+41
| | | | | | | | BUG=6000538 This change also updates expected diagnostics for our existing tests. Change-Id: I98e12625d121ae20fcb6dcaacf0852c0f239c604
* Update llvm-rs-cc to support API level 16.Stephen Hines2012-02-164-0/+22
| | | | | | Also update the date on the copyright notice for reflected files. Change-Id: I58f12a8e2aeda16bd7384bb88bb7e7028774c5da
* Merge "Clean up graphics/compute root() distinction."Stephen Hines2012-02-143-5/+3
|\
| * Clean up graphics/compute root() distinction.Stephen Hines2012-02-103-5/+3
| | | | | | | | | | | | BUG=6000538 Change-Id: I29096556dff2072a8757e0dfd3321006cd60bb27
* | Support initialization of constant array exports.Stephen Hines2012-02-136-0/+38
| | | | | | | | | | | | BUG=5901034 Change-Id: Ibdc74323080518223bbf79caef0c91030c501f17
* | Revert "Support initialization of constant array exports."Stephen Hines2012-02-136-38/+0
| | | | | | | | This reverts commit dc8853ace563c3a7e1976d570bf8fe96cfb11446.
* | Support initialization of constant array exports.Stephen Hines2012-02-106-0/+38
|/ | | | | | BUG=5901034 Change-Id: I61fba1cdf54a5e3289da01730e8bc3d0d2e72050
* Reflect constant primitive types back to Java.Stephen Hines2012-01-313-0/+21
| | | | | | | We reflect it in the containing class as follows: public final static TYPE const_NAME = INIT; Change-Id: I478a6ba75715cfe3ddf1196794153721b793b287
* Support updating CTS tests via slang's test.py.Stephen Hines2012-01-3011-21/+112
| | | | | | | | Running test.py with "-u" will trigger an update of the checked-in CTS test files (.bc and reflected .java classes). Tests to be checked-in are denoted by the presence of a file with the name "IN_CTS" in their subdirectory. Change-Id: I3273200bd93404a3229aad73a80ae70c83a18c54
* Update error diagnostic for struct/array copy.Stephen Hines2011-12-181-1/+1
| | | | | | | | | | | An upstream Clang change caused F_struct_array_copy to start failing with the latest downstreaming work. I noticed that the change makes the diagnostic more clear, but can be confusing for the StartLoc (for the variable). This change updates the test to use the new source location (for the actual assignment operator), while making sure that StartLoc points to the LHS variable in the assignment. Change-Id: Ie58b602ad4ce69d80b82fc03475fbd5d4beb17c7
* Update error diagnostics.Stephen Hines2011-12-094-7/+9
| | | | Change-Id: I8415450504f95cc3ad35866ed884fafc7ee24c90
* Add support for warning flag processing.Stephen Hines2011-12-057-1/+17
| | | | | | BUG=5714569 Change-Id: I96567325df605c5eb0f0bf2f2371a1cea9718a5b
* Add test for API level 15.Stephen Hines2011-11-233-0/+9
| | | | Change-Id: Ic5d9069d61e40223854801db41f4fe5a7dac2caa
* Update the unit test since we have Android 16 API.Logan Chien2011-11-162-2/+2
| | | | Change-Id: I3d28525e49b7a47bba07df463dcc373fe8928b52
* Update tests for highest API level.Stephen Hines2011-11-102-2/+2
| | | | Change-Id: I5a3cbe8de21075ab39a952d80d7fa0aa87d03e10
* resolved conflicts for merge of f736d5a1 to ics-mr1Stephen Hines2011-10-276-0/+20
|\ | | | | | | Change-Id: If31e6d49af2571458500f42f8cc2310758dfaa26
| * Add back pre-ICS support for "int root(int);".Stephen Hines2011-10-266-0/+20
| | | | | | | | | | | | BUG=5521638 Change-Id: Ic1f3c071562c687a98125c2151e306313c5405b8