Rename CloneContext::mod to CloneContext::dst

In the future, CloneContext will be operating on `Program`s so a field called `mod` is poorly named.
CloneContext has a `src` member, so rename to `dst` to keep symmetry.

Bug: tint:390
Change-Id: Ic724f8a18b46ef719790394cdc810f7eb3681234
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38364
Commit-Queue: David Neto <dneto@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton
2021-01-22 13:41:06 +00:00
committed by Commit Bot service account
parent 6761160dc1
commit 5c243f824c
67 changed files with 81 additions and 81 deletions

View File

@@ -59,7 +59,7 @@ uint64_t AccessControl::BaseAlignment(MemoryLayout mem_layout) const {
}
AccessControl* AccessControl::Clone(CloneContext* ctx) const {
return ctx->mod->create<AccessControl>(access_, ctx->Clone(subtype_));
return ctx->dst->create<AccessControl>(access_, ctx->Clone(subtype_));
}
} // namespace type

View File

@@ -46,7 +46,7 @@ uint64_t Alias::BaseAlignment(MemoryLayout mem_layout) const {
}
Alias* Alias::Clone(CloneContext* ctx) const {
return ctx->mod->create<Alias>(ctx->Clone(symbol()), ctx->Clone(subtype_));
return ctx->dst->create<Alias>(ctx->Clone(symbol()), ctx->Clone(subtype_));
}
} // namespace type

View File

@@ -96,7 +96,7 @@ std::string Array::type_name() const {
}
Array* Array::Clone(CloneContext* ctx) const {
return ctx->mod->create<Array>(ctx->Clone(subtype_), size_,
return ctx->dst->create<Array>(ctx->Clone(subtype_), size_,
ctx->Clone(decorations()));
}

View File

@@ -33,7 +33,7 @@ std::string Bool::type_name() const {
}
Bool* Bool::Clone(CloneContext* ctx) const {
return ctx->mod->create<Bool>();
return ctx->dst->create<Bool>();
}
} // namespace type

View File

@@ -52,7 +52,7 @@ std::string DepthTexture::type_name() const {
}
DepthTexture* DepthTexture::Clone(CloneContext* ctx) const {
return ctx->mod->create<DepthTexture>(dim());
return ctx->dst->create<DepthTexture>(dim());
}
} // namespace type

View File

@@ -41,7 +41,7 @@ uint64_t F32::BaseAlignment(MemoryLayout) const {
}
F32* F32::Clone(CloneContext* ctx) const {
return ctx->mod->create<F32>();
return ctx->dst->create<F32>();
}
} // namespace type

View File

@@ -41,7 +41,7 @@ uint64_t I32::BaseAlignment(MemoryLayout) const {
}
I32* I32::Clone(CloneContext* ctx) const {
return ctx->mod->create<I32>();
return ctx->dst->create<I32>();
}
} // namespace type

View File

@@ -56,7 +56,7 @@ uint64_t Matrix::BaseAlignment(MemoryLayout mem_layout) const {
}
Matrix* Matrix::Clone(CloneContext* ctx) const {
return ctx->mod->create<Matrix>(ctx->Clone(subtype_), rows_, columns_);
return ctx->dst->create<Matrix>(ctx->Clone(subtype_), rows_, columns_);
}
} // namespace type

View File

@@ -41,7 +41,7 @@ std::string MultisampledTexture::type_name() const {
}
MultisampledTexture* MultisampledTexture::Clone(CloneContext* ctx) const {
return ctx->mod->create<MultisampledTexture>(dim(), ctx->Clone(type_));
return ctx->dst->create<MultisampledTexture>(dim(), ctx->Clone(type_));
}
} // namespace type

View File

@@ -36,7 +36,7 @@ Pointer::Pointer(Pointer&&) = default;
Pointer::~Pointer() = default;
Pointer* Pointer::Clone(CloneContext* ctx) const {
return ctx->mod->create<Pointer>(ctx->Clone(subtype_), storage_class_);
return ctx->dst->create<Pointer>(ctx->Clone(subtype_), storage_class_);
}
} // namespace type

View File

@@ -41,7 +41,7 @@ std::string SampledTexture::type_name() const {
}
SampledTexture* SampledTexture::Clone(CloneContext* ctx) const {
return ctx->mod->create<SampledTexture>(dim(), ctx->Clone(type_));
return ctx->dst->create<SampledTexture>(dim(), ctx->Clone(type_));
}
} // namespace type

View File

@@ -46,7 +46,7 @@ std::string Sampler::type_name() const {
}
Sampler* Sampler::Clone(CloneContext* ctx) const {
return ctx->mod->create<Sampler>(kind_);
return ctx->dst->create<Sampler>(kind_);
}
} // namespace type

View File

@@ -163,7 +163,7 @@ std::string StorageTexture::type_name() const {
}
StorageTexture* StorageTexture::Clone(CloneContext* ctx) const {
return ctx->mod->create<StorageTexture>(dim(), image_format_);
return ctx->dst->create<StorageTexture>(dim(), image_format_);
}
} // namespace type

View File

@@ -83,7 +83,7 @@ uint64_t Struct::BaseAlignment(MemoryLayout mem_layout) const {
}
Struct* Struct::Clone(CloneContext* ctx) const {
return ctx->mod->create<Struct>(ctx->Clone(symbol()), ctx->Clone(struct_));
return ctx->dst->create<Struct>(ctx->Clone(symbol()), ctx->Clone(struct_));
}
} // namespace type

View File

@@ -41,7 +41,7 @@ uint64_t U32::BaseAlignment(MemoryLayout) const {
}
U32* U32::Clone(CloneContext* ctx) const {
return ctx->mod->create<U32>();
return ctx->dst->create<U32>();
}
} // namespace type

View File

@@ -53,7 +53,7 @@ uint64_t Vector::BaseAlignment(MemoryLayout mem_layout) const {
}
Vector* Vector::Clone(CloneContext* ctx) const {
return ctx->mod->create<Vector>(ctx->Clone(subtype_), size_);
return ctx->dst->create<Vector>(ctx->Clone(subtype_), size_);
}
} // namespace type

View File

@@ -33,7 +33,7 @@ std::string Void::type_name() const {
}
Void* Void::Clone(CloneContext* ctx) const {
return ctx->mod->create<Void>();
return ctx->dst->create<Void>();
}
} // namespace type