utils: Add UniqueAllocator

UniqueAllocator is used to allocate unique instances of the template type.

This will be used to clean up duplicated code we have throughout Tint.

Change-Id: I79d5834bf7c7c31cdefd38d4fa3b9240f7ebbf5f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82741
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2022-03-05 00:29:15 +00:00
committed by Tint LUCI CQ
parent 4cb1329181
commit e228319549
5 changed files with 128 additions and 0 deletions

View File

@@ -361,6 +361,7 @@ tint_unittests_source_set("tint_unittests_utils_src") {
"../../src/tint/utils/scoped_assignment_test.cc",
"../../src/tint/utils/string_test.cc",
"../../src/tint/utils/transform_test.cc",
"../../src/tint/utils/unique_allocator_test.cc",
"../../src/tint/utils/unique_vector_test.cc",
]
}