aboutsummaryrefslogtreecommitdiff
path: root/Driver/AnalysisConsumer.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-08-28 05:02:09 +0000
committerTed Kremenek <kremenek@apple.com>2008-08-28 05:02:09 +0000
commit56b98719b0dbebb33cb228afa888c47156be2381 (patch)
tree57e14ede5a9c5b4d4cb1ff7b6c5f2998b18de534 /Driver/AnalysisConsumer.cpp
parentf1f17006b2213d90d24cd0b77239da448297b48c (diff)
Ubigraph visualization: represent cached nodes with a different style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/AnalysisConsumer.cpp')
-rw-r--r--Driver/AnalysisConsumer.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/Driver/AnalysisConsumer.cpp b/Driver/AnalysisConsumer.cpp
index a8390e147c..0a59797549 100644
--- a/Driver/AnalysisConsumer.cpp
+++ b/Driver/AnalysisConsumer.cpp
@@ -479,8 +479,7 @@ class UbigraphViz : public ExplodedNodeImpl::Auditor {
public:
UbigraphViz(llvm::raw_ostream* out, llvm::sys::Path& dir,
- llvm::sys::Path& filename)
- : Out(out), Dir(dir), Filename(filename), Cntr(0) {}
+ llvm::sys::Path& filename);
~UbigraphViz();
@@ -535,14 +534,26 @@ void UbigraphViz::AddEdge(ExplodedNodeImpl* Src, ExplodedNodeImpl* Dst) {
M[Dst] = DstID = Cntr++;
*Out << "('vertex', " << DstID << ")\n";
}
- else
+ else {
+ // We have hit DstID before. Change its style to reflect a cache hit.
DstID = DstI->second;
+ *Out << "('change_vertex_style', " << DstID << ", 1)\n";
+ }
// Add the edge.
*Out << "('edge', " << SrcID << ", " << DstID
<< ", ('arrow','true'), ('oriented', 'true'))\n";
}
+UbigraphViz::UbigraphViz(llvm::raw_ostream* out, llvm::sys::Path& dir,
+ llvm::sys::Path& filename)
+ : Out(out), Dir(dir), Filename(filename), Cntr(0) {
+
+ *Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n";
+ *Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66'),"
+ " ('size', '1.5'))\n";
+}
+
UbigraphViz::~UbigraphViz() {
Out.reset(0);
llvm::cerr << "Running 'ubiviz' program... ";