Fix unused function warning.
TGlslangToSpvTraverser::getExtBuiltins is only used when AMD_EXTENSIONS
is defined, so only define it in that case to avoid an unused function
warning.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 9690496..ce5e369 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -186,7 +186,9 @@
bool isTrivialLeaf(const glslang::TIntermTyped* node);
bool isTrivial(const glslang::TIntermTyped* node);
spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
+#ifdef AMD_EXTENSIONS
spv::Id getExtBuiltins(const char* name);
+#endif
glslang::SpvOptions& options;
spv::Function* shaderEntry;
@@ -5954,6 +5956,7 @@
return builder.createOp(spv::OpPhi, boolTypeId, phiOperands);
}
+#ifdef AMD_EXTENSIONS
// Return type Id of the imported set of extended instructions corresponds to the name.
// Import this set if it has not been imported yet.
spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name)
@@ -5967,6 +5970,7 @@
return extBuiltins;
}
}
+#endif
}; // end anonymous namespace