More to BasicBlock

This commit is contained in:
Siu Kwan Lam 2013-02-07 15:31:54 -06:00
commit b9ac22d136
2 changed files with 9 additions and 1 deletions

View file

@ -724,5 +724,11 @@ PyObject* MDNode_get(llvm::LLVMContext &Cxt, PyObject* Vals)
}
static
PyObject* BasicBlock_getInstList(llvm::BasicBlock* BB)
{
return iplist_to_pylist(BB->getInstList(),
"llvm::Value",
"llvm::Instruction");
}

View file

@ -20,3 +20,5 @@ class BasicBlock:
isLandingPad = Method(cast(Bool, bool))
removePredecessor = Method(Void, ptr(BasicBlock), cast(bool, Bool))
removePredecessor |= Method(Void, ptr(BasicBlock))
getInstList = CustomMethod('BasicBlock_getInstList', PyObjectPtr)