Front-end infrastructure: Encapsulate semantic-level questions/actions about const/temp.
Much about const or temp is mechanical, about actual declaration,
while much is semantic, about something higher level. This commit
checks every use everywhere, and for the high-level ones, substitutes
an encapsulated version instead.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 9b03b9a..b837a25 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -1629,7 +1629,7 @@
// First, steer off constants, which are not SPIR-V variables, but
// can still have a mapping to a SPIR-V Id.
// This includes specialization constants.
- if (node->getQualifier().storage == glslang::EvqConst) {
+ if (node->getQualifier().isConstant()) {
return createSpvSpecConstant(*node);
}
@@ -3732,7 +3732,7 @@
// - when running into a non-spec-constant, switch to createSpvConstant()
spv::Id TGlslangToSpvTraverser::createSpvSpecConstant(const glslang::TIntermTyped& node)
{
- assert(node.getQualifier().storage == glslang::EvqConst);
+ assert(node.getQualifier().isConstant());
if (! node.getQualifier().specConstant) {
// hand off to the non-spec-constant path