Expanded graph-visualization to include optional pretty-printing of checker-specific state.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48238 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp
index 6d1c03d..e2fec9f 100644
--- a/Analysis/GRExprEngine.cpp
+++ b/Analysis/GRExprEngine.cpp
@@ -1554,6 +1554,7 @@
#ifndef NDEBUG
static GRExprEngine* GraphPrintCheckerState;
static SourceManager* GraphPrintSourceManager;
+static ValueState::CheckerStatePrinter* GraphCheckerStatePrinter;
namespace llvm {
template<>
@@ -1794,7 +1795,7 @@
Out << "\\|StateID: " << (void*) N->getState() << "\\|";
- N->getState()->printDOT(Out);
+ N->getState()->printDOT(Out, GraphCheckerStatePrinter);
Out << "\\l";
return Out.str();
@@ -1825,11 +1826,13 @@
else {
GraphPrintCheckerState = this;
GraphPrintSourceManager = &getContext().getSourceManager();
+ GraphCheckerStatePrinter = TF->getCheckerStatePrinter();
llvm::ViewGraph(*G.roots_begin(), "GRExprEngine");
GraphPrintCheckerState = NULL;
GraphPrintSourceManager = NULL;
+ GraphCheckerStatePrinter = NULL;
}
#endif
}
@@ -1838,6 +1841,7 @@
#ifndef NDEBUG
GraphPrintCheckerState = this;
GraphPrintSourceManager = &getContext().getSourceManager();
+ GraphCheckerStatePrinter = TF->getCheckerStatePrinter();
GRExprEngine::GraphTy* TrimmedG = G.Trim(Beg, End);
@@ -1850,5 +1854,6 @@
GraphPrintCheckerState = NULL;
GraphPrintSourceManager = NULL;
+ GraphCheckerStatePrinter = NULL;
#endif
}