summaryrefslogtreecommitdiffstats
path: root/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp')
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp b/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
index 02817d4..edbea99 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
@@ -9,10 +9,16 @@
// are documented in the header file.
//
+#if defined(_MSC_VER)
+#pragma warning(disable: 4718)
+#endif
+
#include "compiler/SymbolTable.h"
#include <stdio.h>
+#include <algorithm>
+
//
// TType helper function needs a place to live.
//
@@ -71,6 +77,20 @@ int TType::getStructSize() const
return structureSize;
}
+void TType::computeDeepestStructNesting()
+{
+ if (!getStruct()) {
+ return;
+ }
+
+ int maxNesting = 0;
+ for (TTypeList::const_iterator tl = getStruct()->begin(); tl != getStruct()->end(); ++tl) {
+ maxNesting = std::max(maxNesting, ((*tl).type)->getDeepestStructNesting());
+ }
+
+ deepestStructNesting = 1 + maxNesting;
+}
+
//
// Dump functions.
//