Make libbcinfo buildable for native_bridge am: e8ce95fc3d am: 337522d4dd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/compile/slang/+/12128052

Change-Id: I7f482eb03781ecb95a031886ae2d9270f894bfaa
diff --git a/Android.bp b/Android.bp
index ce00396..9269d62 100644
--- a/Android.bp
+++ b/Android.bp
@@ -103,12 +103,6 @@
     ],
 
     shared_libs: ["libbcinfo"],
-
-    product_variables: {
-        unbundled_build: {
-            enabled: false,
-        },
-    },
 }
 
 // ========================================================
@@ -188,12 +182,6 @@
             ],
         },
     },
-
-    product_variables: {
-        unbundled_build: {
-            enabled: false,
-        },
-    },
 }
 
 cc_binary_host {
diff --git a/BitWriter_2_9/BitcodeWriter.cpp b/BitWriter_2_9/BitcodeWriter.cpp
index caee7de..8942e47 100644
--- a/BitWriter_2_9/BitcodeWriter.cpp
+++ b/BitWriter_2_9/BitcodeWriter.cpp
@@ -1698,7 +1698,7 @@
   WriteInt32ToBuffer(BCSize     , Buffer, Position);
   WriteInt32ToBuffer(CPUType    , Buffer, Position);
 
-  // If the file is not a multiple of 16 bytes, insert dummy padding.
+  // If the file is not a multiple of 16 bytes, insert placeholder padding.
   while (Buffer.size() & 15)
     Buffer.push_back(0);
 }
diff --git a/BitWriter_2_9/ValueEnumerator.cpp b/BitWriter_2_9/ValueEnumerator.cpp
index dedbedd..8d6475c 100644
--- a/BitWriter_2_9/ValueEnumerator.cpp
+++ b/BitWriter_2_9/ValueEnumerator.cpp
@@ -263,7 +263,7 @@
       (isa<MDNode>(MD) || isa<MDString>(MD) || isa<ConstantAsMetadata>(MD)) &&
       "Invalid metadata kind");
 
-  // Insert a dummy ID to block the co-recursive call to
+  // Insert a placeholder ID to block the co-recursive call to
   // EnumerateMDNodeOperands() from re-visiting MD in a cyclic graph.
   //
   // Return early if there's already an ID.
@@ -279,7 +279,7 @@
   HasMDString |= isa<MDString>(MD);
   HasDILocation |= isa<DILocation>(MD);
 
-  // Replace the dummy ID inserted above with the correct one.  MDValueMap may
+  // Replace the placeholder ID inserted above with the correct one.  MDValueMap may
   // have changed by inserting operands, so we need a fresh lookup here.
   MDs.push_back(MD);
   MDValueMap[MD] = MDs.size();
diff --git a/BitWriter_2_9_func/BitcodeWriter.cpp b/BitWriter_2_9_func/BitcodeWriter.cpp
index 3ed3380..30b8e7d 100644
--- a/BitWriter_2_9_func/BitcodeWriter.cpp
+++ b/BitWriter_2_9_func/BitcodeWriter.cpp
@@ -1762,7 +1762,7 @@
   WriteInt32ToBuffer(BCSize     , Buffer, Position);
   WriteInt32ToBuffer(CPUType    , Buffer, Position);
 
-  // If the file is not a multiple of 16 bytes, insert dummy padding.
+  // If the file is not a multiple of 16 bytes, insert placeholder padding.
   while (Buffer.size() & 15)
     Buffer.push_back(0);
 }
diff --git a/BitWriter_2_9_func/ValueEnumerator.cpp b/BitWriter_2_9_func/ValueEnumerator.cpp
index ce785da..0690af7 100644
--- a/BitWriter_2_9_func/ValueEnumerator.cpp
+++ b/BitWriter_2_9_func/ValueEnumerator.cpp
@@ -263,7 +263,7 @@
       (isa<MDNode>(MD) || isa<MDString>(MD) || isa<ConstantAsMetadata>(MD)) &&
       "Invalid metadata kind");
 
-  // Insert a dummy ID to block the co-recursive call to
+  // Insert a placeholder ID to block the co-recursive call to
   // EnumerateMDNodeOperands() from re-visiting MD in a cyclic graph.
   //
   // Return early if there's already an ID.
@@ -279,7 +279,7 @@
   HasMDString |= isa<MDString>(MD);
   HasDILocation |= isa<DILocation>(MD);
 
-  // Replace the dummy ID inserted above with the correct one.  MDValueMap may
+  // Replace the placeholder ID inserted above with the correct one.  MDValueMap may
   // have changed by inserting operands, so we need a fresh lookup here.
   MDs.push_back(MD);
   MDValueMap[MD] = MDs.size();
diff --git a/BitWriter_3_2/BitcodeWriter.cpp b/BitWriter_3_2/BitcodeWriter.cpp
index c57dd45..2099ac0 100644
--- a/BitWriter_3_2/BitcodeWriter.cpp
+++ b/BitWriter_3_2/BitcodeWriter.cpp
@@ -1836,7 +1836,7 @@
   WriteInt32ToBuffer(BCSize     , Buffer, Position);
   WriteInt32ToBuffer(CPUType    , Buffer, Position);
 
-  // If the file is not a multiple of 16 bytes, insert dummy padding.
+  // If the file is not a multiple of 16 bytes, insert placeholder padding.
   while (Buffer.size() & 15)
     Buffer.push_back(0);
 }
diff --git a/BitWriter_3_2/ValueEnumerator.cpp b/BitWriter_3_2/ValueEnumerator.cpp
index 4ce2ec6..9d74d75 100644
--- a/BitWriter_3_2/ValueEnumerator.cpp
+++ b/BitWriter_3_2/ValueEnumerator.cpp
@@ -263,7 +263,7 @@
       (isa<MDNode>(MD) || isa<MDString>(MD) || isa<ConstantAsMetadata>(MD)) &&
       "Invalid metadata kind");
 
-  // Insert a dummy ID to block the co-recursive call to
+  // Insert a placeholder ID to block the co-recursive call to
   // EnumerateMDNodeOperands() from re-visiting MD in a cyclic graph.
   //
   // Return early if there's already an ID.
@@ -279,7 +279,7 @@
   HasMDString |= isa<MDString>(MD);
   HasDILocation |= isa<DILocation>(MD);
 
-  // Replace the dummy ID inserted above with the correct one.  MDValueMap may
+  // Replace the placeholder ID inserted above with the correct one.  MDValueMap may
   // have changed by inserting operands, so we need a fresh lookup here.
   MDs.push_back(MD);
   MDValueMap[MD] = MDs.size();
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..d97975c
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,3 @@
+third_party {
+  license_type: NOTICE
+}
diff --git a/slang_rs_context.cpp b/slang_rs_context.cpp
index b2c3179..ed2c47e 100644
--- a/slang_rs_context.cpp
+++ b/slang_rs_context.cpp
@@ -276,7 +276,7 @@
     }
   }
 
-  // Create a dummy root in slot 0 if a root kernel is not seen
+  // Create a placeholder root in slot 0 if a root kernel is not seen
   // and there exists a non-root kernel.
   if (valid && mExportForEach[0] == nullptr) {
     const size_t numExportedForEach = mExportForEach.size();
@@ -302,7 +302,7 @@
 }
 
 bool RSContext::processReducePragmas(Backend *BE) {
-  // This is needed to ensure that the dummy variable is emitted into
+  // This is needed to ensure that the placeholder variable is emitted into
   // the bitcode -- which in turn forces the function to be emitted
   // into the bitcode.  We couldn't do this at
   // markUsedByReducePragma() time because we had to wait until the
@@ -346,7 +346,7 @@
   // reduce).
   FD->setIsUsed();
 
-  // Each constituent function "f" of a reduction kernel gets a dummy variable generated for it:
+  // Each constituent function "f" of a reduction kernel gets a placeholder variable generated for it:
   //   void *.rs.reduce_fn.f = (void*)&f;
   // This is a trick to ensure that clang will not delete "f" as unused.
 
diff --git a/slang_rs_export_foreach.h b/slang_rs_export_foreach.h
index 4622e24..d5928f5 100644
--- a/slang_rs_export_foreach.h
+++ b/slang_rs_export_foreach.h
@@ -48,7 +48,7 @@
   std::string mName;
 
   // For diagnostic purposes, we record the order in which we parse
-  // foreach kernels.  Does not apply to a dummy root.
+  // foreach kernels.  Does not apply to a placeholder root.
   unsigned mOrdinal;
 
   RSExportRecordType *mParamPacketType;
diff --git a/slang_rs_reflection.cpp b/slang_rs_reflection.cpp
index 2c30e4f..875d84b 100644
--- a/slang_rs_reflection.cpp
+++ b/slang_rs_reflection.cpp
@@ -1005,7 +1005,7 @@
     mState->declareForEachDummyRoot(EF);
 
     if (!mCollecting) {
-      // Skip reflection for dummy root() kernels. Note that we have to
+      // Skip reflection for placeholder root() kernels. Note that we have to
       // advance the next slot number for ForEach, however.
       mOut.indent() << "//private final static int "
                     << RS_EXPORT_FOREACH_INDEX_PREFIX << EF->getName() << " = "
@@ -1498,7 +1498,7 @@
     mOut.indent() << "// " << InComment << "\n";
   startFunction(AM_Public, false, ResultTypeName.c_str(), MethodName, Args);
   const std::string &In0Name = Args[0].second;
-  // Sanity-check inputs
+  // Validity-check inputs
   if (Ins.size() > 1)
     mOut.indent() << "Type t0, t1;\n";
   for (size_t InIdx = 0, InEnd = Ins.size(); InIdx < InEnd; ++InIdx) {