Fix build error: unused variable 'BoringBits'
Bug: 32780232
Bug: 20260865
Bug: 21597073
Test: build aosp_x86_64-user
build aosp_x86_64-eng; run slang/tests
Merged-In: Ie23fafd82323080be7d4f1287974079b370e2e94
Change-Id: If966bf74cbe295b9168b83f86c4fd45850de534e
(cherry picked from commit 1fc96fa576a4daec3e8fc88d72b948006a20b6f2)
diff --git a/slang_rs_reflection_state.cpp b/slang_rs_reflection_state.cpp
index 0d233b1..aac03e3 100644
--- a/slang_rs_reflection_state.cpp
+++ b/slang_rs_reflection_state.cpp
@@ -466,11 +466,15 @@
// These are properties in the metadata that we need to check.
const unsigned SpecialParameterBits = bcinfo::MD_SIG_X|bcinfo::MD_SIG_Y|bcinfo::MD_SIG_Z|bcinfo::MD_SIG_Ctxt;
- // These are properties in the metadata that we already check in
- // some other way.
- const unsigned BoringBits = bcinfo::MD_SIG_In|bcinfo::MD_SIG_Out|bcinfo::MD_SIG_Usr|bcinfo::MD_SIG_Kernel;
+#ifndef __DISABLE_ASSERTS
+ {
+ // These are properties in the metadata that we already check in
+ // some other way.
+ const unsigned BoringBits = bcinfo::MD_SIG_In|bcinfo::MD_SIG_Out|bcinfo::MD_SIG_Usr|bcinfo::MD_SIG_Kernel;
- slangAssert((Metadata & ~(SpecialParameterBits | BoringBits)) == 0);
+ slangAssert((Metadata & ~(SpecialParameterBits | BoringBits)) == 0);
+ }
+#endif
auto &mSignatureMetadata = mFiles.Current().mForEaches[EF->getOrdinal()].mSignatureMetadata;
if (isCollecting()) {