1 // 2 // Copyright 2020 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_MSL_MAPVARIABLESTOMEMBERACCESS_H_ 8 #define COMPILER_TRANSLATOR_MSL_MAPVARIABLESTOMEMBERACCESS_H_ 9 10 #include <functional> 11 12 #include "common/angleutils.h" 13 #include "compiler/translator/Compiler.h" 14 15 namespace sh 16 { 17 18 // Maps TIntermSymbol nodes to TIntermNode nodes. 19 // The parent function of a symbol is provided to the mapping when applicable. 20 [[nodiscard]] bool MapSymbols(TCompiler &compiler, 21 TIntermBlock &root, 22 std::function<TIntermNode &(const TFunction *, TIntermSymbol &)> map); 23 24 } // namespace sh 25 26 #endif // COMPILER_TRANSLATOR_MSL_MAPVARIABLESTOMEMBERACCESS_H_ 27