| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Bug: 21597073
We must use dyn_cast_or_null<> instead of dyn_cast<>, because we aren't
guaranteed to always be passed a NamedDecl.
Change-Id: I7b00eacc639a688f8e2fdbeea80b87a01372e232
(cherry picked from commit 33ea573b6df7b7fe48d2b68d4c479f33082e3c0d)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 21597073
This fixes an issue where a function argument is not checked for
compatibility until the reflected code generation (at which point the
message is far more cryptic). We do this by checking parameters for
externally-visible functions and externally-visible globals in our
ValidateType() routine.
Change-Id: I5ab9db1a11ed0e395c7623f1c9997632da057269
(cherry picked from commit ab94bccca64c9b126cbd1b732aa5e681d8639b99)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 7342860
- Enable NativeHalfType and HalfArgsAndReturns for Langopts for API >=
23
- Add half and its vector variants to the list of reflected types
- Use addF16 as the FieldPacker method for setting Float16 values.
- Add tests that HalfArgumentsAndReturns is not enabled on API < 23.
This should serve as an indirect test that NativeHalfType is also
disabled.
Change-Id: I164ff6f8a3ed206326b904afa5430230b97d41c8
(cherry picked from commit e4dd17d7b2a292a600756da7680beecd78f74033)
|
|
|
|
| |
Change-Id: I19e441e193637ddb39b3afb3bc95579755ac0a90
|
|\
| |
| |
| |
| | |
* commit '340b5550cf63b6beae3b12c2e91377bce7704c34':
Fix dangling reference to a local std::string.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 16031597
llvm::StringRefs are just lightweight wrappers around strings, and don't
retain/own any of the storage for the actual underlying string. This causes
lifetime issues if any local std::string objects that are then wrapped by
llvm::StringRef ever escape. When the local object goes out of scope, we are
left with a dangling reference.
Valgrind helped us to catch this happening for constant array exports, which
only ever use a statically named "<ConstantArray>" reference, so we can
simply replace it with static C string (wrapped by llvm::StringRef).
Change-Id: I0a9fae2687bc9f53d091d56cf15f99bb75ca46e4
|
|\ \
| |/
|/|
| |
| | |
* commit '03ec6ed2ecb9adf0cf125b0fa6c96844f093d4d0':
Replace the NULL macro with nullptr literal.
|
| |
| |
| |
| | |
Change-Id: I33609969cd0d7aa55eaa83fb2c65f5faa6d55fa0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The first is to handle structs in invoke parameter lists by assuming struct and
not struct*. The second is to not cache LLVM types for RS object types because
it breaks on 64-bit compilation.
Cherry-pick of d56a92fc2b1d417ce53d9550548fe1661fa37d40
Change-Id: I26d7dd7395ef0146eb84d43cbec5cf8d49d09697
|
| |
| |
| |
| |
| |
| | |
bug 16846318
Change-Id: If6c207b757a716029aae58a6b12601e16c296438
|
|/
|
|
|
|
| |
The first is to handle structs in invoke parameter lists by assuming struct and not struct*. The second is to not cache LLVM types for RS object types because it breaks on 64-bit compilation.
Change-Id: I26d7dd7395ef0146eb84d43cbec5cf8d49d09697
|
|
|
|
|
|
| |
Bug: 16031597
Change-Id: Ifb3c4eca5e7ae16106260c2b5f5da6854c021a3a
|
|
|
|
| |
Change-Id: Ibb9db8ffe20513ca1ec56403c632e10e82a4fe86
|
|
|
|
| |
Change-Id: I30ca59ef860fbc976b8fe6bc21cbd50146b19a6a
|
|
|
|
| |
Change-Id: I37451d8217c3d61ea76db377785045edb2d5c4b0
|
|
|
|
| |
Change-Id: I898d7b21d7856559e75d80c6147fc4b4229c75dd
|
|
|
|
|
| |
It applies to more than just Primitives and should not have been in there.
Change-Id: If2b6a9d2a87a05176a74bcf7212f65cf1cdf67fe
|
|
|
|
| |
Change-Id: Iead651dc9e0321d36bb653bc178ac1a9af6d34f9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, enable new data types to be defined, out of order.
More CLs are coming to continue refactoring the code and removing
duplication.
modified: Android.mk
deleted: RSSpec.mk
modified: slang_rs_export_element.cpp
modified: slang_rs_export_type.cpp
modified: slang_rs_export_type.h
modified: slang_rs_metadata_spec_encoder.cpp
modified: slang_rs_object_ref_count.cpp
modified: slang_rs_object_ref_count.h
deleted: slang_rs_spec_table.cpp
modified: slang_rs_type_spec.h
Change-Id: I3eb3e4357bbe9af26011df714795de8e495fec68
|
|
|
| |
Change-Id: Icd59efa1197098076555c505c31939866e504a83
|
|
|
|
|
|
| |
Remove a lot of boilerplate code by adding error reporting methods to RSContext. There are still a few additional files that could be cleaned. That will be for another CL someday.
Change-Id: I6a261735720227ac87d94dbdea5ce4a7b8ef6cca
|
|
|
|
|
|
|
| |
Prior versions would just crash when attempting to reflect an enum type.
This patch maps enums to integers for reflection in Java.
Change-Id: I5b278d670564ceb606a6b96804f76a798bedc89c
|
|
|
|
|
| |
Bug: 10461673
Change-Id: I681f918d89983522dd162d7f4606ed5811ab2560
|
|
|
|
|
|
|
|
| |
s/getLinkage/getFormalLinkage
Path.h -> PathV1.h
Fix test output diagnostics related to pragma location
Change-Id: I7ab5372e848494ac40f1284eb6f9accc18092ad7
|
|
|
|
| |
Change-Id: I4cf3718041d8876d4a23a412b6b4fa4226ec3b50
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I666df2ff91532318883dd48ea1249178b2ebda81
|
|
|
|
| |
Change-Id: I533d26827fa650a481df65b2e20ac6dbc3559244
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
This reverts commit f5abb503e67587ad89bcec99ed925d4a75448dcd
|
|
|
|
|
|
|
|
|
| |
BUG=6009244
This is only an error in pre-JB builds that can't support proper ref-counting
within a FieldPacker.
Change-Id: Ib96b5ec2befa48ec44890391e518ad557e9a9117
|
|
|
|
|
|
| |
BUG=5972398
Change-Id: Iede58fde457d16293345e741f80109f89e653ad5
|
|
|
|
|
|
| |
BUG=5972398
Change-Id: I76fdb98fa60bd70468d088f9034acf00e443d6c8
|
|
|
|
|
|
|
|
|
|
| |
BUG=5972398
1) Remove non-USER export kinds.
2) Removing some DataKind references.
3) More name refactoring to use getRSReflectionType().
Change-Id: I008aeb37820df37acea0db9300ff9594a40cb086
|
|
|
|
|
|
| |
BUG=5972398
Change-Id: I5d1efdbde6eb0b7bb139bdf672a056a4aa5f26e1
|
|
|
|
| |
Change-Id: Idb127f2fd6e637039454f47299360aec5a4edfe8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- StructType::isAnonymous is renamed to StructType::isLiteral.
- PassManagerBuilder has been moved from
llvm/Support/PassManagerBuilder.h to
llvm/Transforms/IPO/PassManagerBuilder.h
- Include llvm/Transforms/IPO.h for llvm::createInternalizePass.
- clang::DiagClient has be renamed to clang::DiagnosticConsumer.
Besides, we have to implement one additional pure virtual method
'clone' for create a clone of slang::DiagnosticBuffer.
- llvm::Linker::LinkModules comes with one additional parameter.
Passing llvm::Linker::DestroySource should be equivalent to
the old code we were using.
- slang::Slang is now derived from clang::ModuleLoader and implemented
loadModule pure virtual method (though we will always return NULL.)
- clang::Preprocessor is taking one additional parameter for
clang::ModuleLoader.
- clang::Diagnostic has been changed. A lot of the method has been
moved to clang::DiagnosticsEngine, and we can no longer 'Report' a
diagnostic from clang::Diagnostic. We have to use
clang::DiagnosticEngine instead.
- llvm::setCodeModel has been removed.
Change-Id: I1f2a4cbeaf61a8ed1d0d635a5a0e1baa90d99d07
|
|
|
|
|
|
|
|
|
| |
I should not have attempted to delete the storage in this case. At this point
in compilation, we have already appended it to a list of objects to be cleaned
up. This results in a mistaken double deletion of the same object, which in
turn causes the compiler to seg fault (instead of terminating nicely).
Change-Id: I479153e146ef3ed3a5c728494c35d7d2b75fc292
|
|
|
|
| |
Change-Id: Ie49fde338437a600384f10c5c7a730691bd0b9a4
|
|
|
|
| |
Change-Id: Ibe6060a0d1c42b9725524de7f4cb95551b711717
|
|
|
|
|
|
| |
Related BUG=5028838
Change-Id: I5867f8e5d7097ef349a6d1eda1681b0014ac66c9
|
|
|
|
| |
Change-Id: I376a8a24c238c4e27d37c4f846b93e2f6e38d79c
|
|
|
|
| |
Change-Id: Ice65c8b691550e2d11caf621e0f88c822316601b
|
|
|
|
|
|
|
| |
This change also refactors variable validation in general for RS.
BUG=4283858
Change-Id: I4527986a07c9cf2babdc5b855cdb1f00e3535d5b
|
|
|
|
|
|
|
|
| |
- Use llvm::StructType::get(LLVMContext &, ArrayRef<const Type *>,
bool) to create struct type instead of the ellipsis version.
Otherwise, an error about ambigious overload function will occur.
Change-Id: I8012d8d9fa10a89f28e858533d427807df7214d5
|
|
|
|
|
|
|
|
|
|
|
| |
clang/AST/RecordLayout.h now uses CharUnits, which will return
the size of a struct using number of bytes as the unit. So we
no longer need the division which converts number of bits to
number of bytes.
RL->getSize().getQuantity() is equivalent to something like
sizeof operator.
Change-Id: Ib3a4ec67349a275dfb8a73c4eac860395b101a05
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- API for name mangling. (Changing from non-public APIs to the
public one)
- API changes for clang::Diagnostic::getNumErrors ->
clang::Diagnostic::hasErrorOccurred
- API changes for clang::CharUnits and Quantity type.
- API changes libLLVMSystem -> libLLVMSupport.
- Change clang::Token::eom -> clang::Token::eod.
- Remove SourceRange parameter for DeclRefExpr::Create and
MemberExpr::Create.
- Add const qualifier for several unsafe type cast.
|