forked from OSchip/llvm-project
[analyzer] [NFC] Remove unused method visitItemsInWorkList
Differential Revision: https://reviews.llvm.org/D42562 llvm-svn: 323696
This commit is contained in:
parent
994e889022
commit
21428afae8
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue