aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Function.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-22 16:03:20 +0000
committerChris Lattner <sabre@nondot.org>2003-10-22 16:03:20 +0000
commitc149c47d1f98afe504ad69c3456a4de6803015ef (patch)
tree85e997670373a2b93c999e9412588296cd81f43b /include/llvm/Function.h
parent3b39537e71f1b4bdf7dd49244e39e0a585951f1e (diff)
downloadexternal_llvm-c149c47d1f98afe504ad69c3456a4de6803015ef.zip
external_llvm-c149c47d1f98afe504ad69c3456a4de6803015ef.tar.gz
external_llvm-c149c47d1f98afe504ad69c3456a4de6803015ef.tar.bz2
Add two new function stubs for viewing the CFG of a function inside of the
debugger git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r--include/llvm/Function.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 1c97d14..7d4f43f 100644
--- a/include/llvm/Function.h
+++ b/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) {