Simplify GRIndirectGotoNodeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47068 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/GREngine.cpp b/Analysis/GREngine.cpp
index 3d46fa3..a15bcb5 100644
--- a/Analysis/GREngine.cpp
+++ b/Analysis/GREngine.cpp
@@ -361,32 +361,15 @@
if (!(*I)->isSink()) Eng.WList->Enqueue(*I);
}
-GRIndirectGotoNodeBuilderImpl::Destination
-GRIndirectGotoNodeBuilderImpl::Iterator::operator*() {
- CFGBlock* B = *I;
- assert (!B->empty());
- LabelStmt* L = cast<LabelStmt>(B->getLabel());
- return Destination(L, *I);
-}
-
-GRIndirectGotoNodeBuilderImpl::Iterator
-GRIndirectGotoNodeBuilderImpl::begin() {
- return Iterator(DispatchBlock.succ_begin());
-}
-
-GRIndirectGotoNodeBuilderImpl::Iterator
-GRIndirectGotoNodeBuilderImpl::end() {
- return Iterator(DispatchBlock.succ_end());
-}
ExplodedNodeImpl*
-GRIndirectGotoNodeBuilderImpl::generateNodeImpl(const Destination& D,
+GRIndirectGotoNodeBuilderImpl::generateNodeImpl(const Iterator& I,
void* St,
bool isSink) {
bool IsNew;
ExplodedNodeImpl* Succ =
- Eng.G->getNodeImpl(BlockEdge(Eng.getCFG(), Src, D.getBlock(), true),
+ Eng.G->getNodeImpl(BlockEdge(Eng.getCFG(), Src, I.getBlock(), true),
St, &IsNew);
Succ->addPredecessor(Pred);