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>
This commit is contained in:
parent
67473c7a6c
commit
2cbf265aec
|
@ -75,19 +75,6 @@ bool Transform::Requires(CloneContext& ctx,
|
|||
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())) {
|
||||
|
|
|
@ -185,16 +185,6 @@ class Transform : public Castable<Transform> {
|
|||
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.
|
||||
|
|
Loading…
Reference in New Issue