Add ptrtoint cast in cbuilder
This commit is contained in:
parent
42f7219c3f
commit
d270e885cc
1 changed files with 4 additions and 0 deletions
|
|
@ -1153,6 +1153,10 @@ class PointerCasting(OperatorMixin):
|
||||||
|
|
||||||
if _is_pointer(ty):
|
if _is_pointer(ty):
|
||||||
return self._temp(self.parent.builder.bitcast(self.value, ty))
|
return self._temp(self.parent.builder.bitcast(self.value, ty))
|
||||||
|
|
||||||
|
if _is_int(ty):
|
||||||
|
return self._temp(self.parent.builder.ptrtoint(self.value, ty))
|
||||||
|
|
||||||
raise CastError(self.type, ty)
|
raise CastError(self.type, ty)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue