aboutsummaryrefslogtreecommitdiffstats
path: root/Reference.h
diff options
context:
space:
mode:
authorTimur Iskhakov <iskhakovt@google.com>2017-08-09 00:22:02 -0700
committerTimur Iskhakov <iskhakovt@google.com>2017-08-15 18:03:42 -0700
commitcec46c48853a8c1246656d0095a9faa3fad5c4f9 (patch)
tree42ffd1b245d908404e3be321fc620bc1c91774c2 /Reference.h
parent58d4b79e36dbdf70411621235793ea7ae579e174 (diff)
downloadandroid_system_tools_hidl-cec46c48853a8c1246656d0095a9faa3fad5c4f9.tar.gz
android_system_tools_hidl-cec46c48853a8c1246656d0095a9faa3fad5c4f9.tar.bz2
android_system_tools_hidl-cec46c48853a8c1246656d0095a9faa3fad5c4f9.zip
Move type-related stuff ouside of parsing
3 new passes: resolving inheritance, evaluating constant expressions and validation. `resolveInheritance` completes type fields definition which depends on type base class (so it needs to be looked up before this pass). That includes interface method serial autofill and enum value autofill. `evaluate` evaluates constant expressions. This pass depends on the previous one as enum autofill creates new expressions (+1s). `validate` proceedes all type-related checks. `callForReference` is a special way of calling passes for types: it is used for types that are defined in reference. Currently that is only array type (size is defined in reference only) and template type as it could contain an array. We need such special way to avoid cyclic evaluate call: struct S { S[42] arr; }; Test: full build, device boot Test: hidl_test Test: full build on mac Test: generated files differ only in constant expression comments Change-Id: I499e62ae41c52cc86b13d0014eed790454137af6
Diffstat (limited to 'Reference.h')
-rw-r--r--Reference.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Reference.h b/Reference.h
index 8a73609..e774bd2 100644
--- a/Reference.h
+++ b/Reference.h
@@ -73,7 +73,7 @@ struct Reference {
bool hasLocation() const { return mLocation.isValid(); }
- const Location& getLocation() const {
+ const Location& location() const {
CHECK(hasLocation());
return mLocation;
}