mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 10:25:28 +00:00
ast: Move Module function methods to FunctionList
Module will be split into Module (immutable) and ModuleBuilder (mutable). By moving these methods to the FunctionList, we can deduplicate a bunch of common logic. Bug: tint:390 Change-Id: I3fd85200aae4e8dc3d5afce8c9aaa6512809a3a0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38363 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
281b602f59
commit
6761160dc1
@@ -50,7 +50,7 @@ Inspector::~Inspector() = default;
|
||||
std::vector<EntryPoint> Inspector::GetEntryPoints() {
|
||||
std::vector<EntryPoint> result;
|
||||
|
||||
for (auto* func : module_.functions()) {
|
||||
for (auto* func : module_.Functions()) {
|
||||
if (!func->IsEntryPoint()) {
|
||||
continue;
|
||||
}
|
||||
@@ -278,7 +278,7 @@ std::vector<ResourceBinding> Inspector::GetMultisampledTextureResourceBindings(
|
||||
}
|
||||
|
||||
ast::Function* Inspector::FindEntryPointByName(const std::string& name) {
|
||||
auto* func = module_.FindFunctionBySymbol(module_.GetSymbol(name));
|
||||
auto* func = module_.Functions().Find(module_.GetSymbol(name));
|
||||
if (!func) {
|
||||
error_ += name + " was not found!";
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user