Adding support for building the "insertvalue" instruction.
This commit is contained in:
parent
f74f5129bd
commit
7c22f37b57
3 changed files with 35 additions and 0 deletions
|
|
@ -1959,6 +1959,13 @@ class Builder(object):
|
|||
# obsolete synonym for extract_value
|
||||
getresult = extract_value
|
||||
|
||||
def insert_value(self, retval, rhs, idx, name=""):
|
||||
check_is_value(retval)
|
||||
check_is_value(rhs)
|
||||
return _make_value(
|
||||
_core.LLVMBuildInsertValue(self.ptr, retval.ptr, rhs.ptr, idx,
|
||||
name))
|
||||
|
||||
def phi(self, ty, name=""):
|
||||
check_is_type(ty)
|
||||
return _make_value(_core.LLVMBuildPhi(self.ptr, ty.ptr, name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue