Add Symbol to alias.

This CL adds a Symbol alongside the name in the Alias type. The name
will be removed in a future CL.

Change-Id: I23fa77566cc7a2aead783b64c34c0cc3195df24b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35461
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
dan sinclair
2020-12-11 19:35:03 +00:00
committed by Commit Bot service account
parent 6b59bf45aa
commit 4226b6a1d8
27 changed files with 102 additions and 85 deletions

View File

@@ -421,7 +421,7 @@ TEST_F(ValidateControlBlockTest, SwitchCaseAlias_Pass) {
// }
ast::type::U32 u32;
ast::type::Alias my_int{"MyInt", &u32};
ast::type::Alias my_int{mod()->RegisterSymbol("MyInt"), "MyInt", &u32};
auto* var = create<ast::Variable>(
Source{}, // source

View File

@@ -133,7 +133,7 @@ TEST_F(ValidatorTypeTest, AliasRuntimeArrayIsNotLast_Fail) {
ast::type::F32 u32;
ast::type::Array array(&u32, 0, ast::ArrayDecorationList{});
ast::type::Alias alias{"RTArr", &array};
ast::type::Alias alias{mod()->RegisterSymbol("RTArr"), "RTArr", &array};
ast::StructMemberList members;
{
@@ -167,7 +167,7 @@ TEST_F(ValidatorTypeTest, AliasRuntimeArrayIsLast_Pass) {
ast::type::F32 u32;
ast::type::Array array(&u32, 0, ast::ArrayDecorationList{});
ast::type::Alias alias{"RTArr", &array};
ast::type::Alias alias{mod()->RegisterSymbol("RTArr"), "RTArr", &array};
ast::StructMemberList members;
{