forked from OSchip/llvm-project
Added more boilerplate for processing end-of-paths.
llvm-svn: 45724
This commit is contained in:
parent
ef81aa75f6
commit
35ff5b0ee6
|
@ -130,7 +130,11 @@ void ReachabilityEngineImpl::ProcessBlkBlk(const BlkBlkEdge& E,
|
||||||
if (Blk == &cfg.getExit()) {
|
if (Blk == &cfg.getExit()) {
|
||||||
assert (cfg.getExit().size() == 0 && "EXIT block cannot contain Stmts.");
|
assert (cfg.getExit().size() == 0 && "EXIT block cannot contain Stmts.");
|
||||||
// Process the End-Of-Path.
|
// Process the End-Of-Path.
|
||||||
ProcessEOP(Blk, Pred);
|
void* State = ProcessEOP(Blk, Pred->State);
|
||||||
|
bool IsNew;
|
||||||
|
ExplodedNodeImpl* V = G->getNodeImpl(BlkStmtEdge(Blk,NULL),State,&IsNew);
|
||||||
|
V->addUntypedPredecessor(Pred);
|
||||||
|
if (IsNew) G->addEndOfPath(V);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ protected:
|
||||||
void ProcessBlkStmt(const BlkStmtEdge& E, ExplodedNodeImpl* Pred);
|
void ProcessBlkStmt(const BlkStmtEdge& E, ExplodedNodeImpl* Pred);
|
||||||
void ProcessStmtBlk(const StmtBlkEdge& E, ExplodedNodeImpl* Pred);
|
void ProcessStmtBlk(const StmtBlkEdge& E, ExplodedNodeImpl* Pred);
|
||||||
|
|
||||||
virtual void ProcessEOP(CFGBlock* Blk, ExplodedNodeImpl* Pred);
|
virtual void* ProcessEOP(CFGBlock* Blk, void* State);
|
||||||
virtual void ProcessStmt(Stmt* S, ExplodedNodeImpl* Pred);
|
virtual void ProcessStmt(Stmt* S, ExplodedNodeImpl* Pred);
|
||||||
virtual void ProcessTerminator(Stmt* Terminator, ExplodedNodeImpl* Pred);
|
virtual void ProcessTerminator(Stmt* Terminator, ExplodedNodeImpl* Pred);
|
||||||
|
|
||||||
|
@ -136,17 +136,11 @@ protected:
|
||||||
return (void*) getCheckerState()->getInitialState();
|
return (void*) getCheckerState()->getInitialState();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ProcessEOP(CFGBlock* Blk, ExplodedNodeImpl* Pred) {
|
virtual void* ProcessEOP(CFGBlock* Blk, void* State) {
|
||||||
assert (false && "Not implemented yet.");
|
|
||||||
// FIXME: Perform dispatch to adjust state.
|
// FIXME: Perform dispatch to adjust state.
|
||||||
// ExplodedNodeImpl* V = G->getNodeImpl(BlkStmtEdge(Blk,NULL),
|
return State;
|
||||||
// Pred->State).first;
|
|
||||||
|
|
||||||
// V->addPredecessor(Pred);
|
|
||||||
// Graph.addEndOfPath(V);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual void ProcessStmt(Stmt* S, ExplodedNodeImpl* Pred) {
|
virtual void ProcessStmt(Stmt* S, ExplodedNodeImpl* Pred) {
|
||||||
CurrentBlkExpr = S;
|
CurrentBlkExpr = S;
|
||||||
assert(false && "Not implemented.");
|
assert(false && "Not implemented.");
|
||||||
|
@ -170,14 +164,12 @@ public:
|
||||||
ReachabilityEngine(CFG& cfg, reng::WorkList* wlist)
|
ReachabilityEngine(CFG& cfg, reng::WorkList* wlist)
|
||||||
: ReachabilityEngineImpl(cfg,wlist) {}
|
: ReachabilityEngineImpl(cfg,wlist) {}
|
||||||
|
|
||||||
/// getGraph - Returns the exploded graph. Ownership of the graph remains
|
/// getGraph - Returns the exploded graph.
|
||||||
/// with the ReachabilityEngine object.
|
GraphTy& getGraph() { return *static_cast<GraphTy*>(G.get()); }
|
||||||
GraphTy* getGraph() const { return static_cast<GraphTy*>(G.get()); }
|
|
||||||
|
|
||||||
/// getCheckerState - Returns the internal checker state. Ownership is not
|
/// getCheckerState - Returns the internal checker state.
|
||||||
/// transferred to the caller.
|
CheckerTy& getCheckerState() {
|
||||||
CheckerTy* getCheckerState() const {
|
return *static_cast<GraphTy*>(G.get())->getCheckerState();
|
||||||
return static_cast<GraphTy*>(G.get())->getCheckerState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// takeGraph - Returns the exploded graph. Ownership of the graph is
|
/// takeGraph - Returns the exploded graph. Ownership of the graph is
|
||||||
|
|
Loading…
Reference in New Issue