From bce687b4a09dc11deb85616005b6abeff12193cb Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 7 Sep 2014 14:55:46 +0800 Subject: [PATCH] py2llvm/base_types: implement 'not' on 'None' --- artiq/py2llvm/base_types.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/artiq/py2llvm/base_types.py b/artiq/py2llvm/base_types.py index a534795ca..cbd6126b5 100644 --- a/artiq/py2llvm/base_types.py +++ b/artiq/py2llvm/base_types.py @@ -26,6 +26,12 @@ class VNone(VGeneric): r.set_const_value(builder, False) 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): def __init__(self, nbits=32):