diff --git a/src/transform/transform.cc b/src/transform/transform.cc index ec55e33d31..db6e47eb11 100644 --- a/src/transform/transform.cc +++ b/src/transform/transform.cc @@ -75,19 +75,6 @@ bool Transform::Requires(CloneContext& ctx, return true; } -ast::DecorationList Transform::RemoveDecorations( - CloneContext& ctx, - const ast::DecorationList& in, - std::function 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->Parent())) { diff --git a/src/transform/transform.h b/src/transform/transform.h index 9f9e6d3aa5..f270e277c3 100644 --- a/src/transform/transform.h +++ b/src/transform/transform.h @@ -185,16 +185,6 @@ class Transform : public Castable { bool Requires(CloneContext& ctx, std::initializer_list 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 should_remove); - /// Removes the statement `stmt` from the transformed program. /// RemoveStatement handles edge cases, like statements in the initializer and /// continuing of for-loops.