diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-08-28 05:02:09 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-08-28 05:02:09 +0000 |
commit | 803e7e1e4775ace8668897faf07744fbe9c08de6 (patch) | |
tree | d7f1e2f2499756990599ebbe05a24e056273d2f5 /clang/Driver/AnalysisConsumer.cpp | |
parent | de8008a130d197f71284163b45a862aeba19d273 (diff) | |
download | bcm5719-llvm-803e7e1e4775ace8668897faf07744fbe9c08de6.tar.gz bcm5719-llvm-803e7e1e4775ace8668897faf07744fbe9c08de6.zip |
Ubigraph visualization: represent cached nodes with a different style.
llvm-svn: 55463
Diffstat (limited to 'clang/Driver/AnalysisConsumer.cpp')
-rw-r--r-- | clang/Driver/AnalysisConsumer.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/clang/Driver/AnalysisConsumer.cpp b/clang/Driver/AnalysisConsumer.cpp index a8390e147c8..0a59797549e 100644 --- a/clang/Driver/AnalysisConsumer.cpp +++ b/clang/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... "; |