tint/ast: Generate access.[h|cc]

Emits all the enum info from the single-source-of-truth `intrinsics.def` file

Change-Id: Ib9170a2337597d4d81983c446d50582b518c6d71
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105329
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
Ben Clayton
2022-10-12 09:42:00 +00:00
committed by Dawn LUCI CQ
parent 47b7fe5785
commit bccd87c37a
27 changed files with 235 additions and 157 deletions

View File

@@ -25,7 +25,7 @@ namespace tint::sem {
Pointer::Pointer(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
: subtype_(subtype), address_space_(address_space), access_(access) {
TINT_ASSERT(Semantic, !subtype->Is<Reference>());
TINT_ASSERT(Semantic, access != ast::Access::kUndefined);
TINT_ASSERT(Semantic, access != ast::Access::kInvalid);
}
size_t Pointer::Hash() const {

View File

@@ -24,7 +24,7 @@ namespace tint::sem {
Reference::Reference(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
: subtype_(subtype), address_space_(address_space), access_(access) {
TINT_ASSERT(Semantic, !subtype->Is<Reference>());
TINT_ASSERT(Semantic, access != ast::Access::kUndefined);
TINT_ASSERT(Semantic, access != ast::Access::kInvalid);
}
size_t Reference::Hash() const {