2 // Copyright (c) 2002-2014 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.
7 #ifndef COMPILER_TRANSLATOR_REGENERATE_STRUCT_NAMES_H_
8 #define COMPILER_TRANSLATOR_REGENERATE_STRUCT_NAMES_H_
10 #include "compiler/translator/Intermediate.h"
11 #include "compiler/translator/SymbolTable.h"
15 class RegenerateStructNames : public TIntermTraverser
18 RegenerateStructNames(const TSymbolTable &symbolTable,
20 : mSymbolTable(symbolTable),
21 mShaderVersion(shaderVersion),
25 virtual void visitSymbol(TIntermSymbol *);
26 virtual bool visitAggregate(Visit, TIntermAggregate *);
29 const TSymbolTable &mSymbolTable;
32 // Indicating the depth of the current scope.
33 // The global scope is 1.
36 // If a struct's declared globally, push its ID in this set.
37 std::set<int> mDeclaredGlobalStructs;
40 #endif // COMPILER_TRANSLATOR_REGENERATE_STRUCT_NAMES_H_