Have TypesBuilder pointer and structure methods return ast types

These were the last two types to migrate away from typ::TypePair.

Bug: tint:724
Change-Id: Ibc03e35db00236081a5792f787864ab69ce0d00c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51665
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-05-20 15:02:38 +00:00
committed by Tint LUCI CQ
parent d3e80fd36c
commit 37c4e4a41d
3 changed files with 16 additions and 23 deletions

View File

@@ -710,10 +710,7 @@ class ProgramBuilder {
typ::Pointer pointer(typ::Type type,
ast::StorageClass storage_class) const {
type = MaybeCreateTypename(type);
return {type.ast ? builder->create<ast::Pointer>(type, storage_class)
: nullptr,
type.sem ? builder->create<sem::Pointer>(type, storage_class)
: nullptr};
return {builder->create<ast::Pointer>(type, storage_class)};
}
/// @param source the Source of the node
@@ -724,11 +721,7 @@ class ProgramBuilder {
typ::Type type,
ast::StorageClass storage_class) const {
type = MaybeCreateTypename(type);
return {type.ast
? builder->create<ast::Pointer>(source, type, storage_class)
: nullptr,
type.sem ? builder->create<sem::Pointer>(type, storage_class)
: nullptr};
return {builder->create<ast::Pointer>(source, type, storage_class)};
}
/// @param storage_class the storage class of the pointer