From 0a7aebadfbb3534284546aa3ca8612314c08f136 Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Tue, 26 Jun 2018 16:56:45 +0200 Subject: Update ANGLE to chromium/3280 Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1 Reviewed-by: Friedemann Kleint --- .../angle/src/compiler/translator/ValidateSwitch.h | 52 ++++++---------------- 1 file changed, 14 insertions(+), 38 deletions(-) (limited to 'src/3rdparty/angle/src/compiler/translator/ValidateSwitch.h') diff --git a/src/3rdparty/angle/src/compiler/translator/ValidateSwitch.h b/src/3rdparty/angle/src/compiler/translator/ValidateSwitch.h index ddbefc5619..2d2dd70f78 100644 --- a/src/3rdparty/angle/src/compiler/translator/ValidateSwitch.h +++ b/src/3rdparty/angle/src/compiler/translator/ValidateSwitch.h @@ -7,46 +7,22 @@ #ifndef COMPILER_TRANSLATOR_VALIDATESWITCH_H_ #define COMPILER_TRANSLATOR_VALIDATESWITCH_H_ -#include "compiler/translator/IntermNode.h" +#include "compiler/translator/BaseTypes.h" +#include "compiler/translator/Common.h" -class TParseContext; - -class ValidateSwitch : public TIntermTraverser +namespace sh { - public: - // Check for errors and output messages any remaining errors on the context. - // Returns true if there are no errors. - static bool validate(TBasicType switchType, TParseContext *context, - TIntermAggregate *statementList, const TSourceLoc &loc); - - void visitSymbol(TIntermSymbol *) override; - void visitConstantUnion(TIntermConstantUnion *) override; - bool visitBinary(Visit, TIntermBinary *) override; - bool visitUnary(Visit, TIntermUnary *) override; - bool visitSelection(Visit visit, TIntermSelection *) override; - bool visitSwitch(Visit, TIntermSwitch *) override; - bool visitCase(Visit, TIntermCase *node) override; - bool visitAggregate(Visit, TIntermAggregate *) override; - bool visitLoop(Visit visit, TIntermLoop *) override; - bool visitBranch(Visit, TIntermBranch *) override; - - private: - ValidateSwitch(TBasicType switchType, TParseContext *context); +class TDiagnostics; +class TIntermBlock; - bool validateInternal(const TSourceLoc &loc); +// Check for errors and output error messages on the context. +// Returns true if there are no errors. +bool ValidateSwitchStatementList(TBasicType switchType, + int shaderVersion, + TDiagnostics *diagnostics, + TIntermBlock *statementList, + const TSourceLoc &loc); - TBasicType mSwitchType; - TParseContext *mContext; - bool mCaseTypeMismatch; - bool mFirstCaseFound; - bool mStatementBeforeCase; - bool mLastStatementWasCase; - int mControlFlowDepth; - bool mCaseInsideControlFlow; - int mDefaultCount; - std::set mCasesSigned; - std::set mCasesUnsigned; - bool mDuplicateCases; -}; +} // namespace sh -#endif // COMPILER_TRANSLATOR_VALIDATESWITCH_H_ +#endif // COMPILER_TRANSLATOR_VALIDATESWITCH_H_ -- cgit v1.2.3