[analyzer] [NFC] Remove unused method visitItemsInWorkList

Differential Revision: https://reviews.llvm.org/D42562

llvm-svn: 323696
This commit is contained in:
George Karpenkov 2018-01-29 21:44:49 +00:00
parent 994e889022
commit 21428afae8
2 changed files with 0 additions and 41 deletions

View File

@ -80,14 +80,6 @@ public:
void setBlockCounter(BlockCounter C) { CurrentCounter = C; }
BlockCounter getBlockCounter() const { return CurrentCounter; }
class Visitor {
public:
Visitor() {}
virtual ~Visitor();
virtual bool visit(const WorkListUnit &U) = 0;
};
virtual bool visitItemsInWorkList(Visitor &V) = 0;
static WorkList *makeDFS();
static WorkList *makeBFS();
static WorkList *makeBFSBlockDFSContents();

View File

@ -37,8 +37,6 @@ STATISTIC(NumPathsExplored,
// Worklist classes for exploration of reachable states.
//===----------------------------------------------------------------------===//
WorkList::Visitor::~Visitor() {}
namespace {
class DFS : public WorkList {
SmallVector<WorkListUnit,20> Stack;
@ -57,15 +55,6 @@ public:
Stack.pop_back(); // This technically "invalidates" U, but we are fine.
return U;
}
bool visitItemsInWorkList(Visitor &V) override {
for (SmallVectorImpl<WorkListUnit>::iterator
I = Stack.begin(), E = Stack.end(); I != E; ++I) {
if (V.visit(*I))
return true;
}
return false;
}
};
class BFS : public WorkList {
@ -85,14 +74,6 @@ public:
return U;
}
bool visitItemsInWorkList(Visitor &V) override {
for (std::deque<WorkListUnit>::iterator
I = Queue.begin(), E = Queue.end(); I != E; ++I) {
if (V.visit(*I))
return true;
}
return false;
}
};
} // end anonymous namespace
@ -135,20 +116,6 @@ namespace {
Queue.pop_front();
return U;
}
bool visitItemsInWorkList(Visitor &V) override {
for (SmallVectorImpl<WorkListUnit>::iterator
I = Stack.begin(), E = Stack.end(); I != E; ++I) {
if (V.visit(*I))
return true;
}
for (std::deque<WorkListUnit>::iterator
I = Queue.begin(), E = Queue.end(); I != E; ++I) {
if (V.visit(*I))
return true;
}
return false;
}
};
} // end anonymous namespace