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_TRANSLATORMETALDIRECT_REWRITEKEYWORDS_H_ 8 #define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_REWRITEKEYWORDS_H_ 9 10 #include <set> 11 12 #include "common/angleutils.h" 13 #include "compiler/translator/Compiler.h" 14 #include "compiler/translator/TranslatorMetalDirect/IdGen.h" 15 16 namespace sh 17 { 18 19 // This walks the tree and renames all names that conflict with the input `keywords`. 20 ANGLE_NO_DISCARD bool RewriteKeywords(TCompiler &compiler, 21 TIntermBlock &root, 22 IdGen &idGen, 23 const std::set<ImmutableString> &keywords); 24 25 } // namespace sh 26 27 #endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_REWRITEKEYWORDS_H_ 28