"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
diff --git a/script_api/Specification.cpp b/script_api/Specification.cpp
index c103dc1..f7d139e 100644
--- a/script_api/Specification.cpp
+++ b/script_api/Specification.cpp
@@ -382,6 +382,9 @@
if (scanner->findTag("value:")) {
spec->mValue = scanner->getValue();
}
+ if (scanner->findTag("type:")) {
+ spec->mType = scanner->getValue();
+ }
constant->scanDocumentationTags(scanner, created, specFile);
scanner->findTag("end:");