transform: Remove unused function
This was shared by the shader IO transforms, but is no longer used
after they were refactored.
Bug: tint:920
Change-Id: I879468bbacda6ecb59c4b49ef2434753df74644c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/61121
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/transform/transform.cc b/src/transform/transform.cc
index ec55e33..db6e47e 100644
--- a/src/transform/transform.cc
+++ b/src/transform/transform.cc
@@ -75,19 +75,6 @@
return true;
}
-ast::DecorationList Transform::RemoveDecorations(
- CloneContext& ctx,
- const ast::DecorationList& in,
- std::function<bool(const ast::Decoration*)> should_remove) {
- ast::DecorationList new_decorations;
- for (auto* deco : in) {
- if (!should_remove(deco)) {
- new_decorations.push_back(ctx.Clone(deco));
- }
- }
- return new_decorations;
-}
-
void Transform::RemoveStatement(CloneContext& ctx, ast::Statement* stmt) {
auto* sem = ctx.src->Sem().Get(stmt);
if (auto* block = tint::As<sem::BlockStatement>(sem->Parent())) {
diff --git a/src/transform/transform.h b/src/transform/transform.h
index 9f9e6d3..f270e27 100644
--- a/src/transform/transform.h
+++ b/src/transform/transform.h
@@ -185,16 +185,6 @@
bool Requires(CloneContext& ctx,
std::initializer_list<const ::tint::TypeInfo*> deps);
- /// Clones the decoration list `in`, removing decorations based on a filter.
- /// @param ctx the clone context
- /// @param in the decorations to clone
- /// @param should_remove the function to select which decorations to remove
- /// @return the cloned decorations
- static ast::DecorationList RemoveDecorations(
- CloneContext& ctx,
- const ast::DecorationList& in,
- std::function<bool(const ast::Decoration*)> should_remove);
-
/// Removes the statement `stmt` from the transformed program.
/// RemoveStatement handles edge cases, like statements in the initializer and
/// continuing of for-loops.