diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-03-11 18:57:24 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-03-11 18:57:24 +0000 |
commit | 461f9776f2b3bc307dd4706822ffc7ef43102fd2 (patch) | |
tree | 9a90eb4c819b4c1ecc4ec1f93c8b121b612bd16c /Analysis/ValueState.cpp | |
parent | 493d7a26d5ea319770ba904b43f2740d43b820cb (diff) |
Expanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
object to pretty-print the component of a state that is specific to a checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Analysis/ValueState.cpp')
-rw-r--r-- | Analysis/ValueState.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Analysis/ValueState.cpp b/Analysis/ValueState.cpp index 1d428f199b..1fc4df9128 100644 --- a/Analysis/ValueState.cpp +++ b/Analysis/ValueState.cpp @@ -476,13 +476,16 @@ ValueState* ValueStateManager::getPersistentState(ValueState& State) { return I; } -void ValueState::printDOT(std::ostream& Out) const { - print(Out, "\\l", "\\|"); +void ValueState::printDOT(std::ostream& Out, CheckerStatePrinter* P) const { + print(Out, P, "\\l", "\\|"); } -void ValueState::print(std::ostream& Out, - const char* nl, - const char* sep) const { +void ValueState::printStdErr(CheckerStatePrinter* P) const { + print(*llvm::cerr, P); +} + +void ValueState::print(std::ostream& Out, CheckerStatePrinter* P, + const char* nl, const char* sep) const { // Print Variable Bindings Out << "Variables:" << nl; @@ -570,4 +573,9 @@ void ValueState::print(std::ostream& Out, } } } + + // Print checker-specific data. + + if (P && CheckerState) + P->PrintCheckerState(Out, CheckerState, nl, sep); } |