Replace TypeDecoration::(Is|As)Access with Castable

Change-Id: I06a2f663cf56f8bb9a9b05557aef428b2d69e84c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34304
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-11-30 23:30:58 +00:00
parent 26e944bc4e
commit 3958f81fd7
5 changed files with 2 additions and 24 deletions

View File

@@ -840,8 +840,8 @@ Expect<ParserImpl::TypedIdentifier> ParserImpl::expect_variable_ident_decl(
for (auto* deco : access_decos) {
// If we have an access control decoration then we take it and wrap our
// type up with that decoration
ty = module_.create<ast::type::AccessControlType>(deco->AsAccess()->value(),
ty);
ty = module_.create<ast::type::AccessControlType>(
deco->As<ast::AccessDecoration>()->value(), ty);
}
return TypedIdentifier{ty, ident.value, ident.source};