diff options
author | David Gross <dgross@google.com> | 2017-02-10 15:10:52 -0800 |
---|---|---|
committer | David Gross <dgross@google.com> | 2017-03-06 10:41:05 -0800 |
commit | cb25a819dbb5bda7e5554ec5ff09d29586d84493 (patch) | |
tree | db4918088fa51d1035fd94bacde4a0f4eec22417 /script_api/Specification.cpp | |
parent | 22aaa218de1d2138a4aebd85d7a38ff8fcac590d (diff) | |
download | rs-cb25a819dbb5bda7e5554ec5ff09d29586d84493.tar.gz |
"static const" instead of "#define" for script API M_* constants.
This makes referenced script API M_* constants visible in the debugger.
Modify rs lldb test for the constants so that it references them.
Adapted from https://android-review.googlesource.com/#/c/210789/
Test: aosp_arm64-eng on emulator
- run slang/tests, slang/lit-tests
- run rs lldb test suite
- run RsTest (32-bit, 64-bit)
- run cts -m RenderscriptTest (32-bit)
- confirmed that omitting type: or value: from constant: causes
script_api/generate.sh to fail with an error
Change-Id: I9cc89771ad5d90432c0ea0a1885aae8d9003dafe
Diffstat (limited to 'script_api/Specification.cpp')
-rw-r--r-- | script_api/Specification.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script_api/Specification.cpp b/script_api/Specification.cpp index c103dc1c..f7d139e0 100644 --- a/script_api/Specification.cpp +++ b/script_api/Specification.cpp @@ -382,6 +382,9 @@ void ConstantSpecification::scanConstantSpecification(Scanner* scanner, SpecFile if (scanner->findTag("value:")) { spec->mValue = scanner->getValue(); } + if (scanner->findTag("type:")) { + spec->mType = scanner->getValue(); + } constant->scanDocumentationTags(scanner, created, specFile); scanner->findTag("end:"); |