Rename all type UnwrapXXX() methods

Give them sensible names.
Make them act consistently.
Remove those that were not used.

Change-Id: Ib043a4093cfae9f81630643e1a0e4eae7bca2440
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50305
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-05-10 18:06:31 +00:00
committed by Commit Bot service account
parent fcda15ef67
commit f14e0e1c8c
17 changed files with 103 additions and 233 deletions

View File

@@ -746,7 +746,7 @@ Output DecomposeStorageAccess::Run(const Program* in, const DataMap&) {
auto* buf = access.var->Declaration();
auto* offset = access.offset->Build(ctx);
auto* buf_ty = access.var->Type()->UnwrapPtrIfNeeded();
auto* buf_ty = access.var->Type()->UnwrapPtr();
auto* el_ty = access.type->UnwrapAll();
auto* insert_after = ConstructedTypeOf(access.var->Type());
Symbol func = state.LoadFunc(ctx, insert_after, buf_ty, el_ty);
@@ -760,7 +760,7 @@ Output DecomposeStorageAccess::Run(const Program* in, const DataMap&) {
for (auto& store : state.stores) {
auto* buf = store.target.var->Declaration();
auto* offset = store.target.offset->Build(ctx);
auto* buf_ty = store.target.var->Type()->UnwrapPtrIfNeeded();
auto* buf_ty = store.target.var->Type()->UnwrapPtr();
auto* el_ty = store.target.type->UnwrapAll();
auto* value = store.assignment->rhs();
auto* insert_after = ConstructedTypeOf(store.target.var->Type());