Added viewCFG methods to Function class, patch from ph.silva#gmail.com

git-svn-id: http://llvm-py.googlecode.com/svn/trunk@39 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
mdevan.foobar 2008-09-09 12:33:48 +00:00
commit f42a40c120
2 changed files with 10 additions and 0 deletions

View file

@ -1645,6 +1645,12 @@ class Function(GlobalValue):
return wrapiter(_core.LLVMGetFirstBasicBlock,
_core.LLVMGetNextBasicBlock, self.ptr, BasicBlock)
def viewCFG(self):
return _core.LLVMViewFunctionCFG(self.ptr)
def viewCFGOnly(self):
return _core.LLVMViewFunctionCFGOnly(self.ptr)
def verify(self):
# Although we're just asking LLVM to return the success or
# failure, it appears to print result to stderr and abort.