1 //
2 // Copyright 2002 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 #ifndef COMPILER_TRANSLATOR_HASHNAMES_H_
8 #define COMPILER_TRANSLATOR_HASHNAMES_H_
9 
10 #include <map>
11 
12 #include "GLSLANG/ShaderLang.h"
13 #include "compiler/translator/Common.h"
14 
15 namespace sh
16 {
17 
18 typedef std::map<TPersistString, TPersistString> NameMap;
19 
20 class ImmutableString;
21 class TSymbol;
22 
23 ImmutableString HashName(const ImmutableString &name,
24                          ShHashFunction64 hashFunction,
25                          NameMap *nameMap);
26 
27 // Hash user-defined name for GLSL output, with special handling for internal names.
28 // The nameMap parameter is optional and is used to cache hashed names if set.
29 ImmutableString HashName(const TSymbol *symbol, ShHashFunction64 hashFunction, NameMap *nameMap);
30 
31 }  // namespace sh
32 
33 #endif  // COMPILER_TRANSLATOR_HASHNAMES_H_
34