From 77fe62f477cd5bb5fb5d21d44c55e1f7a0e385e2 Mon Sep 17 00:00:00 2001 From: Rex Xu Date: Fri, 26 Feb 2021 17:25:45 +0800 Subject: [PATCH] SPV: Change the key of extBuiltinMap to std::string Using const char* is not a good choice. We assume strings are always from spv::E_SPV_XXX definitions. However, it is not the case. We can store the name strings of extended intruction set in local variables. --- SPIRV/GlslangToSpv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 8528955e..f0bf3a6e 100644 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -255,7 +255,7 @@ protected: bool nanMinMaxClamp; // true if use NMin/NMax/NClamp instead of FMin/FMax/FClamp spv::Id stdBuiltins; spv::Id nonSemanticDebugPrintf; - std::unordered_map extBuiltinMap; + std::unordered_map extBuiltinMap; std::unordered_map symbolValues; std::unordered_set rValueParameters; // set of formal function parameters passed as rValues,