forked from M-Labs/artiq
py2llvm/base_types: implement 'not' on 'None'
This commit is contained in:
parent
dddc9259b0
commit
bce687b4a0
|
@ -26,6 +26,12 @@ class VNone(VGeneric):
|
||||||
r.set_const_value(builder, False)
|
r.set_const_value(builder, False)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
def o_not(self, builder):
|
||||||
|
r = VBool()
|
||||||
|
if builder is not None:
|
||||||
|
r.set_const_value(builder, True)
|
||||||
|
return r
|
||||||
|
|
||||||
|
|
||||||
class VInt(VGeneric):
|
class VInt(VGeneric):
|
||||||
def __init__(self, nbits=32):
|
def __init__(self, nbits=32):
|
||||||
|
|
Loading…
Reference in New Issue