Value.uses API

git-svn-id: http://llvm-py.googlecode.com/svn/trunk@70 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
mdevan.foobar 2009-02-25 17:41:37 +00:00
commit d5328ef255
8 changed files with 152 additions and 17 deletions

View file

@ -852,6 +852,14 @@ class Value(llvm.Cacheable):
kind = _core.LLVMGetTypeKind(ptr)
return _make_type(ptr, kind)
@property
def use_count(self):
return _core.LLVMValueGetNumUses(self.ptr)
@property
def uses(self):
return [ _make_value(v) for v in _core.LLVMValueGetUses(self.ptr) ]
class User(Value):