diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-10-22 16:03:20 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-10-22 16:03:20 +0000 |
| commit | 2262fd252e4ea4078673d2d8ac44f235be69870f (patch) | |
| tree | 595a87cf0b98384b3f57c572516ae6ac56cceff5 /llvm | |
| parent | 638b5374d84aa34a8afbbccbf17ab29d19e964d3 (diff) | |
| download | bcm5719-llvm-2262fd252e4ea4078673d2d8ac44f235be69870f.tar.gz bcm5719-llvm-2262fd252e4ea4078673d2d8ac44f235be69870f.zip | |
Add two new function stubs for viewing the CFG of a function inside of the
debugger
llvm-svn: 9373
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Function.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/include/llvm/Function.h b/llvm/include/llvm/Function.h index 1c97d14095a..7d4f43fb76a 100644 --- a/llvm/include/llvm/Function.h +++ b/llvm/include/llvm/Function.h @@ -183,6 +183,21 @@ public: 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) { |

