resolver: Ensure that decorations aren't duplicated

Fixed: tint:525
Change-Id: I993b60f82ac5d5e07e1c76980604e6aaf1b94fb3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53806
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
Ben Clayton
2021-06-09 18:53:57 +00:00
parent c58738a49e
commit 241c16d626
41 changed files with 320 additions and 39 deletions

View File

@@ -56,7 +56,7 @@ CalculateArrayLength::BufferSizeIntrinsic::BufferSizeIntrinsic(
ProgramID program_id)
: Base(program_id) {}
CalculateArrayLength::BufferSizeIntrinsic::~BufferSizeIntrinsic() = default;
std::string CalculateArrayLength::BufferSizeIntrinsic::Name() const {
std::string CalculateArrayLength::BufferSizeIntrinsic::InternalName() const {
return "intrinsic_buffer_size";
}

View File

@@ -43,7 +43,7 @@ class CalculateArrayLength : public Transform {
~BufferSizeIntrinsic() override;
/// @return "buffer_size"
std::string Name() const override;
std::string InternalName() const override;
/// Performs a deep clone of this object using the CloneContext `ctx`.
/// @param ctx the clone context

View File

@@ -564,7 +564,7 @@ struct DecomposeStorageAccess::State {
DecomposeStorageAccess::Intrinsic::Intrinsic(ProgramID program_id, Type ty)
: Base(program_id), type(ty) {}
DecomposeStorageAccess::Intrinsic::~Intrinsic() = default;
std::string DecomposeStorageAccess::Intrinsic::Name() const {
std::string DecomposeStorageAccess::Intrinsic::InternalName() const {
switch (type) {
case kLoadU32:
return "intrinsic_load_u32";

View File

@@ -74,7 +74,7 @@ class DecomposeStorageAccess : public Transform {
/// @return a short description of the internal decoration which will be
/// displayed as `[[internal(<name>)]]`
std::string Name() const override;
std::string InternalName() const override;
/// Performs a deep clone of this object using the CloneContext `ctx`.
/// @param ctx the clone context