TypeGraph: Delete unused function in IdentifyContainers pass

It was accidentally copied from the TypeIdentifier pass.
This commit is contained in:
Alastair Robertson 2023-11-16 07:34:17 -08:00 committed by Alastair Robertson
parent 9e2b48d713
commit 4fdf44b92d
2 changed files with 0 additions and 16 deletions

View File

@ -34,21 +34,6 @@ Pass IdentifyContainers::createPass(
return Pass("IdentifyContainers", fn);
}
bool IdentifyContainers::isAllocator(Type& t) {
auto* c = dynamic_cast<Class*>(&t);
if (!c)
return false;
// Maybe add more checks for an allocator.
// For now, just test for the presence of an "allocate" function
for (const auto& func : c->functions) {
if (func.name == "allocate") {
return true;
}
}
return false;
}
IdentifyContainers::IdentifyContainers(
TypeGraph& typeGraph,
const std::vector<std::unique_ptr<ContainerInfo>>& containers)

View File

@ -39,7 +39,6 @@ class IdentifyContainers : public RecursiveMutator {
public:
static Pass createPass(
const std::vector<std::unique_ptr<ContainerInfo>>& containers);
static bool isAllocator(Type& t);
IdentifyContainers(
TypeGraph& typeGraph,