1 //
2 // Copyright (c) 2017 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 // SymbolUniqueId.cpp: Encapsulates a unique id for a symbol.
7 
8 #include "compiler/translator/SymbolUniqueId.h"
9 
10 #include "compiler/translator/SymbolTable.h"
11 
12 namespace sh
13 {
14 
TSymbolUniqueId(TSymbolTable * symbolTable)15 TSymbolUniqueId::TSymbolUniqueId(TSymbolTable *symbolTable) : mId(symbolTable->nextUniqueIdValue())
16 {
17 }
18 
TSymbolUniqueId(const TSymbol & symbol)19 TSymbolUniqueId::TSymbolUniqueId(const TSymbol &symbol) : mId(symbol.getUniqueId().get())
20 {
21 }
22 
get() const23 int TSymbolUniqueId::get() const
24 {
25     return mId;
26 }
27 
28 }  // namespace sh
29