ast: Remove Variable constructor that doesn't take a source

set_source() will be removed, so sources will only be specifiable at construction time.

Bug: tint:390
Change-Id: I5c79efd3fa501ebd9308f7f93cfb77bc12198047
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35009
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-12-07 21:08:07 +00:00
committed by Commit Bot service account
parent b4b29639a1
commit 321e5a9d7e
54 changed files with 813 additions and 631 deletions

View File

@@ -70,7 +70,7 @@ class VertexPullingHelper {
std::string name,
ast::type::Type* type) {
auto* var = create<ast::DecoratedVariable>(
create<ast::Variable>(name, ast::StorageClass::kInput, type));
create<ast::Variable>(Source{}, name, ast::StorageClass::kInput, type));
ast::VariableDecorationList decorations;
decorations.push_back(create<ast::LocationDecoration>(location, Source{}));
@@ -419,7 +419,7 @@ TEST_F(VertexPullingTest, ExistingVertexIndexAndInstanceIndex) {
{
auto* vertex_index_var =
create<ast::DecoratedVariable>(create<ast::Variable>(
"custom_vertex_index", ast::StorageClass::kInput, &i32));
Source{}, "custom_vertex_index", ast::StorageClass::kInput, &i32));
ast::VariableDecorationList decorations;
decorations.push_back(
@@ -430,9 +430,9 @@ TEST_F(VertexPullingTest, ExistingVertexIndexAndInstanceIndex) {
}
{
auto* instance_index_var =
create<ast::DecoratedVariable>(create<ast::Variable>(
"custom_instance_index", ast::StorageClass::kInput, &i32));
auto* instance_index_var = create<ast::DecoratedVariable>(
create<ast::Variable>(Source{}, "custom_instance_index",
ast::StorageClass::kInput, &i32));
ast::VariableDecorationList decorations;
decorations.push_back(