Enable the GRStateManager to do something when we finish a path. For example,

the ConstraintManager can print its internal state before its solver instance is
destroyed.

llvm-svn: 60204
This commit is contained in:
Zhongxing Xu 2008-11-28 03:07:05 +00:00
parent e9f6c355bf
commit 3698bdb417
3 changed files with 7 additions and 0 deletions

View File

@ -51,6 +51,8 @@ public:
virtual void print(const GRState* St, std::ostream& Out,
const char* nl, const char *sep) = 0;
virtual void EndPath(const GRState* St) {}
};
ConstraintManager* CreateBasicConstraintManager(GRStateManager& statemgr);

View File

@ -414,6 +414,7 @@ public:
/// nodes when the control reaches the end of a function.
void ProcessEndPath(EndPathNodeBuilder& builder) {
getTF().EvalEndPath(*this, builder);
StateMgr.EndPath(builder.getState());
}
GRStateManager& getStateManager() { return StateMgr; }

View File

@ -536,6 +536,10 @@ public:
const llvm::APSInt* getSymVal(const GRState* St, SymbolID sym) {
return ConstraintMgr->getSymVal(St, sym);
}
void EndPath(const GRState* St) {
ConstraintMgr->EndPath(St);
}
};
//===----------------------------------------------------------------------===//