Hash :
8b5e8fdb
Author :
Date :
2017-12-15T14:59:15
Replace remaining usage of TName with TSymbol TName used to contain just a subset of the information stored in TSymbol. It makes more sense to use TSymbol directly instead of converting it to TName. This also improves type safety a bit by making some functions only take in TVariable or TFunction instead of the more generic TName. BUG=angleproject:2267 TEST=angle_unittests Change-Id: Icb46923c25d33ebbbbc06ddc487da25957dda771 Reviewed-on: https://chromium-review.googlesource.com/829143 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef COMPILER_TRANSLATOR_HASHNAMES_H_
#define COMPILER_TRANSLATOR_HASHNAMES_H_
#include <map>
#include "GLSLANG/ShaderLang.h"
#include "compiler/translator/Common.h"
namespace sh
{
typedef std::map<TPersistString, TPersistString> NameMap;
class TSymbol;
TString HashName(const TString &name, ShHashFunction64 hashFunction, NameMap *nameMap);
// Hash user-defined name for GLSL output, with special handling for internal names.
// The nameMap parameter is optional and is used to cache hashed names if set.
TString HashName(const TSymbol *symbol, ShHashFunction64 hashFunction, NameMap *nameMap);
} // namespace sh
#endif // COMPILER_TRANSLATOR_HASHNAMES_H_