tint/ast: Change Function::symbol to Function::name Function::name is an ast::Identifier. The goal here is to have all AST nodes use an identifier instead of symbols directly. This will greatly simplify the renamer transform, and gives the symbol a Source location, which is helpful for diagnostics and tooling. Change-Id: I723a9a104668758db2cb32051efa1f6d3c105913 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119280 Reviewed-by: James Price <jrprice@google.com> Kokoro: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/program_builder_test.cc b/src/tint/program_builder_test.cc index 24e7344..02e3ba2 100644 --- a/src/tint/program_builder_test.cc +++ b/src/tint/program_builder_test.cc
@@ -60,7 +60,7 @@ ASSERT_EQ(inner.AST().Functions().Length(), 1u); ASSERT_EQ(outer.AST().Functions().Length(), 2u); EXPECT_EQ(inner.AST().Functions()[0], outer.AST().Functions()[0]); - EXPECT_EQ(outer.AST().Functions()[1]->symbol, outer.Symbols().Get("b")); + EXPECT_EQ(outer.AST().Functions()[1]->name->symbol, outer.Symbols().Get("b")); EXPECT_EQ(inner.Symbols().Get("a"), outer.Symbols().Get("a")); EXPECT_TRUE(inner.Symbols().Get("a").IsValid()); EXPECT_TRUE(outer.Symbols().Get("a").IsValid());