summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/CallDAG.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/CallDAG.h')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/CallDAG.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/CallDAG.h b/src/3rdparty/angle/src/compiler/translator/CallDAG.h
index 06c377db00..155081c9a2 100644
--- a/src/3rdparty/angle/src/compiler/translator/CallDAG.h
+++ b/src/3rdparty/angle/src/compiler/translator/CallDAG.h
@@ -14,8 +14,9 @@
#include <map>
#include "compiler/translator/IntermNode.h"
-#include "compiler/translator/VariableInfo.h"
+namespace sh
+{
// The translator needs to analyze the the graph of the function calls
// to run checks and analyses; since in GLSL recursion is not allowed
@@ -24,7 +25,7 @@
// can be reused by multiple analyses.
//
// It stores a vector of function records, with one record per function.
-// Records are accessed by index but a mangled function name can be converted
+// Records are accessed by index but a function symbol id can be converted
// to the index of the corresponding record. The records mostly contain the
// AST node of the function and the indices of the function's callees.
//
@@ -41,7 +42,7 @@ class CallDAG : angle::NonCopyable
struct Record
{
std::string name;
- TIntermAggregate *node;
+ TIntermFunctionDefinition *node;
std::vector<int> callees;
};
@@ -53,11 +54,11 @@ class CallDAG : angle::NonCopyable
};
// Returns INITDAG_SUCCESS if it was able to create the DAG, otherwise prints
- // the initialization error in info, if present.
- InitResult init(TIntermNode *root, TInfoSinkBase *info);
+ // the initialization error in diagnostics, if present.
+ InitResult init(TIntermNode *root, TDiagnostics *diagnostics);
// Returns InvalidIndex if the function wasn't found
- size_t findIndex(const TIntermAggregate *function) const;
+ size_t findIndex(const TFunctionSymbolInfo *functionInfo) const;
const Record &getRecordFromIndex(size_t index) const;
const Record &getRecord(const TIntermAggregate *function) const;
@@ -65,6 +66,7 @@ class CallDAG : angle::NonCopyable
void clear();
const static size_t InvalidIndex;
+
private:
std::vector<Record> mRecords;
std::map<int, int> mFunctionIdToIndex;
@@ -72,4 +74,6 @@ class CallDAG : angle::NonCopyable
class CallDAGCreator;
};
+} // namespace sh
+
#endif // COMPILER_TRANSLATOR_CALLDAG_H_