diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 6a86e21d..8dfc681d 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -2126,7 +2126,7 @@ bool TGlslangToSpvTraverser::isShaderEntrypoint(const glslang::TIntermAggregate* { // have to ignore mangling and just look at the base name int firstOpen = node->getName().find('('); - return node->getName().compare(0, firstOpen, glslangIntermediate->getEntryPoint()) == 0; + return node->getName().compare(0, firstOpen, glslangIntermediate->getEntryPoint().c_str()) == 0; } // Make all the functions, skeletally, without actually visiting their bodies. diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 945327df..4c1b7a0c 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -986,7 +986,7 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc, // // Raise error message if main function takes any parameters or returns anything other than void // - if (function.getName() == intermediate.getEntryPoint()) { + if (function.getName() == intermediate.getEntryPoint().c_str()) { if (function.getParamCount() > 0) error(loc, "function cannot take any parameter(s)", function.getName().c_str(), ""); if (function.getType().getBasicType() != EbtVoid) diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index 895bd3e2..c2d0c74a 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -149,7 +149,7 @@ public: void setSource(EShSource s) { source = s; } EShSource getSource() const { return source; } void setEntryPoint(const char* ep) { entryPoint = ep; } - const TString& getEntryPoint() const { return entryPoint; } + const std::string& getEntryPoint() const { return entryPoint; } void setVersion(int v) { version = v; } int getVersion() const { return version; } void setProfile(EProfile p) { profile = p; } @@ -347,7 +347,7 @@ protected: const EShLanguage language; // stage, known at construction time EShSource source; // source language, known a bit later - TString entryPoint; + std::string entryPoint; EProfile profile; int version; int spv; diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index 534174d0..e05f01f1 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -709,7 +709,7 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l currentFunctionType = new TType(EbtVoid); functionReturnsValue = false; - inEntrypoint = (function.getName() == intermediate.getEntryPoint()); + inEntrypoint = (function.getName() == intermediate.getEntryPoint().c_str()); // // New symbol table scope for body of function plus its arguments