Fix a lots of bugs in the newbinding to pass all the tests.
NOTE: debug info has not been implemented yet.
This commit is contained in:
parent
a97b26415e
commit
a09394cacd
32 changed files with 2419 additions and 546 deletions
16
test/malloc.py
Normal file
16
test/malloc.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from llvm.core import *
|
||||
|
||||
def test():
|
||||
m = Module.new('sdf')
|
||||
f = m.add_function(Type.function(Type.void(), []), 'foo')
|
||||
bb = f.append_basic_block('entry')
|
||||
b = Builder.new(bb)
|
||||
alloc = b.malloc(Type.int(), 'ha')
|
||||
inst = b.free(alloc)
|
||||
alloc = b.malloc_array(Type.int(), Constant.int(Type.int(), 10), 'hee')
|
||||
inst = b.free(alloc)
|
||||
b.ret_void()
|
||||
print m
|
||||
|
||||
if __name__ == '__main__':
|
||||
test()
|
||||
Loading…
Add table
Add a link
Reference in a new issue