| 1 | // |
| 2 | // Copyright (c) 2018 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 | // ReplaceVariable.h: Replace all references to a specific variable in the AST with references to |
| 7 | // another variable. |
| 8 | |
| 9 | #ifndef COMPILER_TRANSLATOR_TREEUTIL_REPLACEVARIABLE_H_ |
| 10 | #define COMPILER_TRANSLATOR_TREEUTIL_REPLACEVARIABLE_H_ |
| 11 | |
| 12 | namespace sh |
| 13 | { |
| 14 | |
| 15 | class TIntermBlock; |
| 16 | class TVariable; |
| 17 | class TIntermTyped; |
| 18 | |
| 19 | void ReplaceVariable(TIntermBlock *root, |
| 20 | const TVariable *toBeReplaced, |
| 21 | const TVariable *replacement); |
| 22 | void ReplaceVariableWithTyped(TIntermBlock *root, |
| 23 | const TVariable *toBeReplaced, |
| 24 | const TIntermTyped *replacement); |
| 25 | } // namespace sh |
| 26 | |
| 27 | #endif // COMPILER_TRANSLATOR_TREEUTIL_REPLACEVARIABLE_H_ |
| 28 | |