llvmpy/newbinding/test2.py
Siu Kwan Lam a12c4da93d Init commit for work on new binding
This contains the foundation for the new binding as well as early work on Module and Type.
2013-02-05 13:47:32 -06:00

20 lines
387 B
Python

import api
#api.enable_capsule_dtor_debug(True)
context = api.getGlobalContext()
m = api.Module.new("modname", context)
print m.getModuleIdentifier()
m.setModuleIdentifier('modname2')
print m.getModuleIdentifier()
m.dump()
os = api.raw_svector_ostream_helper.create()
m.print_(os, None)
print os.str()
int1ty = api.Type.getInt1Ty(context)
int1ty.dump()
print int1ty.isIntegerTy(1)