Commit 96a1ceb1 by Nicolas Capens Committed by Nicolas Capens

Remove exit-time destructors.

Bug chromium:101600 Bug swiftshader:118 Change-Id: Id167a84c4d8781989d4d903384c4e6fe6f45fb85 Reviewed-on: https://swiftshader-review.googlesource.com/20868Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent d73b8713
......@@ -21,10 +21,10 @@
static TBehavior getBehavior(const std::string& str)
{
static const std::string kRequire("require");
static const std::string kEnable("enable");
static const std::string kDisable("disable");
static const std::string kWarn("warn");
static const char kRequire[] = "require";
static const char kEnable[] = "enable";
static const char kDisable[] = "disable";
static const char kWarn[] = "warn";
if (str == kRequire) return EBhRequire;
else if (str == kEnable) return EBhEnable;
......@@ -57,11 +57,11 @@ void TDirectiveHandler::handlePragma(const pp::SourceLocation& loc,
const std::string& value,
bool stdgl)
{
static const std::string kSTDGL("STDGL");
static const std::string kOptimize("optimize");
static const std::string kDebug("debug");
static const std::string kOn("on");
static const std::string kOff("off");
static const char kSTDGL[] = "STDGL";
static const char kOptimize[] = "optimize";
static const char kDebug[] = "debug";
static const char kOn[] = "on";
static const char kOff[] = "off";
bool invalidValue = false;
if (stdgl || (name == kSTDGL))
......@@ -98,7 +98,7 @@ void TDirectiveHandler::handleExtension(const pp::SourceLocation& loc,
const std::string& name,
const std::string& behavior)
{
static const std::string kExtAll("all");
static const char kExtAll[] = "all";
TBehavior behaviorVal = getBehavior(behavior);
if (behaviorVal == EBhUndefined)
......
......@@ -48,19 +48,19 @@ enum DirectiveType
static DirectiveType getDirective(const pp::Token *token)
{
static const std::string kDirectiveDefine("define");
static const std::string kDirectiveUndef("undef");
static const std::string kDirectiveIf("if");
static const std::string kDirectiveIfdef("ifdef");
static const std::string kDirectiveIfndef("ifndef");
static const std::string kDirectiveElse("else");
static const std::string kDirectiveElif("elif");
static const std::string kDirectiveEndif("endif");
static const std::string kDirectiveError("error");
static const std::string kDirectivePragma("pragma");
static const std::string kDirectiveExtension("extension");
static const std::string kDirectiveVersion("version");
static const std::string kDirectiveLine("line");
static const char kDirectiveDefine[] = "define";
static const char kDirectiveUndef[] = "undef";
static const char kDirectiveIf[] = "if";
static const char kDirectiveIfdef[] = "ifdef";
static const char kDirectiveIfndef[] = "ifndef";
static const char kDirectiveElse[] = "else";
static const char kDirectiveElif[] = "elif";
static const char kDirectiveEndif[] = "endif";
static const char kDirectiveError[] = "error";
static const char kDirectivePragma[] = "pragma";
static const char kDirectiveExtension[] = "extension";
static const char kDirectiveVersion[] = "version";
static const char kDirectiveLine[] = "line";
if (token->type != pp::Token::IDENTIFIER)
return DIRECTIVE_NONE;
......
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