[llvm-commits] CVS: llvm/include/llvm/Function.h

Chris Lattner lattner at cs.uiuc.edu
Wed Oct 22 11:04:01 PDT 2003


Changes in directory llvm/include/llvm:

Function.h updated: 1.46 -> 1.47

---
Log message:

Add two new function stubs for viewing the CFG of a function inside of the
debugger


---
Diffs of the changes:  (+15 -0)

Index: llvm/include/llvm/Function.h
diff -u llvm/include/llvm/Function.h:1.46 llvm/include/llvm/Function.h:1.47
--- llvm/include/llvm/Function.h:1.46	Mon Oct 20 15:19:14 2003
+++ llvm/include/llvm/Function.h	Wed Oct 22 11:03:20 2003
@@ -183,6 +183,21 @@
 
   virtual void print(std::ostream &OS) const;
 
+  /// viewCFG - This function is meant for use from the debugger.  You can just
+  /// say 'call F->viewCFG()' and a ghostview window should pop up from the
+  /// program, displaying the CFG of the current function with the code for each
+  /// basic block inside.  This depends on there being a 'dot' and 'gv' program
+  /// in your path.
+  ///
+  void viewCFG() const;
+  
+  /// viewCFGOnly - This function is meant for use from the debugger.  It works
+  /// just like viewCFG, but it does not include the contents of basic blocks
+  /// into the nodes, just the label.  If you are only interested in the CFG t
+  /// his can make the graph smaller.
+  ///
+  void viewCFGOnly() const;
+
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Function *) { return true; }
   static inline bool classof(const Value *V) {





More information about the llvm-commits mailing list