Replace FunctionDecoration::(Is|As)Stage with Castable

Change-Id: Iecb683c4bee29952d5f08d92533918f65e342158
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34311
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-11-30 23:30:58 +00:00
parent c24ac2720d
commit 75828dbaee
10 changed files with 18 additions and 35 deletions

View File

@@ -23,6 +23,7 @@
#include "src/ast/int_literal.h"
#include "src/ast/intrinsic.h"
#include "src/ast/sint_literal.h"
#include "src/ast/stage_decoration.h"
#include "src/ast/struct.h"
#include "src/ast/switch_statement.h"
#include "src/ast/type/array_type.h"
@@ -174,7 +175,7 @@ bool ValidatorImpl::ValidateEntryPoint(const ast::FunctionList& funcs) {
}
auto stage_deco_count = 0;
for (auto* deco : func->decorations()) {
if (deco->IsStage()) {
if (deco->Is<ast::StageDecoration>()) {
stage_deco_count++;
}
}