Add rsForEachInternal

Bug: 23535985

Added a compiler intrinsic rsParallelFor to the runtime API, which
is translated into an internal API (rsForEachInternal) by slang.

Added a test to RsTest (for native) and RSTest_CompatLib
(for support).

Enhanced the auto api generator to handle ellipsis argument,
intrinsics, internal-only APIs, and special level for API under
development.

Change-Id: I6e2cf3db868f426aa8e0b9a77732b66c1e6b9f03
diff --git a/api/GenerateHeaderFiles.cpp b/api/GenerateHeaderFiles.cpp
index aac7ecb..9d5b49a 100644
--- a/api/GenerateHeaderFiles.cpp
+++ b/api/GenerateHeaderFiles.cpp
@@ -42,7 +42,7 @@
  * add a check on a flag that can be set for internal builds.  This enables us to keep supporting
  * old APIs in the runtime code.
  */
-static void writeVersionGuardStart(GeneratedFile* file, VersionInfo info, int finalVersion) {
+static void writeVersionGuardStart(GeneratedFile* file, VersionInfo info, unsigned int finalVersion) {
     if (info.intSize == 32) {
         *file << "#ifndef __LP64__\n";
     } else if (info.intSize == 64) {
@@ -218,7 +218,7 @@
         *file << "void";
     }
 
-    *file << makeAttributeTag(spec.getAttribute(), "overloadable",
+    *file << makeAttributeTag(spec.getAttribute(), spec.isOverloadable() ? "overloadable" : "",
                               function->getDeprecatedApiLevel(), function->getDeprecatedMessage());
     *file << "\n";
 
@@ -364,6 +364,10 @@
 
     set<Function*> documentedFunctions;
     for (auto spec : specFile.getFunctionSpecifications()) {
+        // Do not include internal APIs in the header files.
+        if (spec->isInternal()) {
+            continue;
+        }
         Function* function = spec->getFunction();
         if (documentedFunctions.find(function) == documentedFunctions.end()) {
             documentedFunctions.insert(function);