Olli Etuaho | 3d70ca9 | 2017-11-10 16:53:26 +0200 | [diff] [blame] | 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 | // RemoveUnreferencedVariables.h: |
| 7 | // Drop variables that are declared but never referenced in the AST. This avoids adding unnecessary |
Olli Etuaho | 39f74df | 2017-11-20 16:09:57 +0200 | [diff] [blame^] | 8 | // initialization code for them. Also removes unreferenced struct types. |
Olli Etuaho | 3d70ca9 | 2017-11-10 16:53:26 +0200 | [diff] [blame] | 9 | // |
| 10 | |
| 11 | #ifndef COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_ |
| 12 | #define COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_ |
| 13 | |
| 14 | namespace sh |
| 15 | { |
| 16 | |
| 17 | class TIntermBlock; |
| 18 | class TSymbolTable; |
| 19 | |
| 20 | void RemoveUnreferencedVariables(TIntermBlock *root, TSymbolTable *symbolTable); |
| 21 | |
| 22 | } // namespace sh |
| 23 | |
| 24 | #endif // COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_ |