forked from M-Labs/artiq
1
0
Fork 0

py2llvm/base_types: implement 'not' on 'None'

This commit is contained in:
Sebastien Bourdeauducq 2014-09-07 14:55:46 +08:00
parent dddc9259b0
commit bce687b4a0
1 changed files with 6 additions and 0 deletions

View File

@ -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):