From 003fa8ffd6cf4b123f4b22ba53d5fa80091b2408 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Fri, 9 Apr 2021 16:54:48 +0000 Subject: [PATCH] Remove LocalReferencedBuiltinVariables() It ignored entry point builtin parameters, meaning it was mostly useless. Was only used by the FirstIndexOffset, which has been re-written. Change-Id: I26abd69201576cf33b1a71e8e6a1b914871a2a74 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47223 Commit-Queue: Ben Clayton Reviewed-by: James Price --- src/semantic/function.h | 5 ----- src/semantic/sem_function.cc | 15 --------------- 2 files changed, 20 deletions(-) diff --git a/src/semantic/function.h b/src/semantic/function.h index 6301374b51..d3ee7cd357 100644 --- a/src/semantic/function.h +++ b/src/semantic/function.h @@ -136,11 +136,6 @@ class Function : public Castable { /// @returns the referenced storage textures VariableBindings ReferencedDepthTextureVariables() const; - /// Retrieves any locally referenced builtin variables - /// @returns the pairs. - std::vector> - LocalReferencedBuiltinVariables() const; - /// Checks if the given entry point is an ancestor /// @param sym the entry point symbol /// @returns true if `sym` is an ancestor entry point of this function diff --git a/src/semantic/sem_function.cc b/src/semantic/sem_function.cc index 97e94affa9..511f8629d2 100644 --- a/src/semantic/sem_function.cc +++ b/src/semantic/sem_function.cc @@ -170,21 +170,6 @@ Function::VariableBindings Function::ReferencedDepthTextureVariables() const { return ret; } -std::vector> -Function::LocalReferencedBuiltinVariables() const { - std::vector> ret; - - for (auto* var : LocalReferencedModuleVariables()) { - for (auto* deco : var->Declaration()->decorations()) { - if (auto* builtin = deco->As()) { - ret.push_back({var, builtin}); - break; - } - } - } - return ret; -} - bool Function::HasAncestorEntryPoint(Symbol symbol) const { for (const auto& point : ancestor_entry_points_) { if (point == symbol) {