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_DISCOVERDEPENDENTFUNCTIONS_H_
8 #define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_DISCOVERDEPENDENTFUNCTIONS_H_
9 
10 #include <unordered_set>
11 
12 #include "common/angleutils.h"
13 #include "compiler/translator/Compiler.h"
14 
15 namespace sh
16 {
17 
18 // Finds and returns all functions that contain the provided variables.
19 ANGLE_NO_DISCARD std::unordered_set<const TFunction *> DiscoverDependentFunctions(
20     TIntermBlock &root,
21     const std::function<bool(const TVariable &)> &vars);
22 
23 }  // namespace sh
24 
25 #endif  // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_DISCOVERDEPENDENTFUNCTIONS_H_
26