Commit 61902ece by Nico Weber

clang/win: Fix -Wunused-function warning in angle.

Also inline a function that wasn't pulling its weight. No intended behavior change. BUG=chromium:505316 Change-Id: If059700062a38c45971397311af7a2a4037b815e Reviewed-on: https://chromium-review.googlesource.com/288399Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarNico Weber <thakis@chromium.org>
parent 319fb898
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
namespace namespace
{ {
#if ANGLE_SHADER_DEBUG_INFO == ANGLE_ENABLED
#ifdef CREATE_COMPILER_FLAG_INFO #ifdef CREATE_COMPILER_FLAG_INFO
#undef CREATE_COMPILER_FLAG_INFO #undef CREATE_COMPILER_FLAG_INFO
#endif #endif
...@@ -77,16 +79,7 @@ bool IsCompilerFlagSet(UINT mask, UINT flag) ...@@ -77,16 +79,7 @@ bool IsCompilerFlagSet(UINT mask, UINT flag)
} }
} }
const char *GetCompilerFlagName(UINT mask, size_t flagIx) #endif
{
const CompilerFlagInfo &flagInfo = CompilerFlagInfos[flagIx];
if (IsCompilerFlagSet(mask, flagInfo.mFlag))
{
return flagInfo.mName;
}
return nullptr;
}
} }
...@@ -259,10 +252,9 @@ gl::Error HLSLCompiler::compileToBinary(gl::InfoLog &infoLog, const std::string ...@@ -259,10 +252,9 @@ gl::Error HLSLCompiler::compileToBinary(gl::InfoLog &infoLog, const std::string
(*outDebugInfo) += "// Compiler configuration: " + configs[i].name + "\n// Flags:\n"; (*outDebugInfo) += "// Compiler configuration: " + configs[i].name + "\n// Flags:\n";
for (size_t fIx = 0; fIx < ArraySize(CompilerFlagInfos); ++fIx) for (size_t fIx = 0; fIx < ArraySize(CompilerFlagInfos); ++fIx)
{ {
const char *flagName = GetCompilerFlagName(configs[i].flags, fIx); if (IsCompilerFlagSet(configs[i].flags, CompilerFlagInfos[fIx].mFlag))
if (flagName != nullptr)
{ {
(*outDebugInfo) += std::string("// ") + flagName + "\n"; (*outDebugInfo) += std::string("// ") + CompilerFlagInfos[fIx].mName + "\n";
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment