Expand Module binding
This commit is contained in:
parent
3e89a97fdb
commit
f95b691b61
1 changed files with 24 additions and 3 deletions
|
|
@ -5,21 +5,42 @@ from StringRef import StringRef
|
||||||
from raw_ostream import raw_svector_ostream_helper
|
from raw_ostream import raw_svector_ostream_helper
|
||||||
from AssemblyAnnotationWriter import AssemblyAnnotationWriter
|
from AssemblyAnnotationWriter import AssemblyAnnotationWriter
|
||||||
|
|
||||||
|
# class Module
|
||||||
Module = llvm.Class()
|
Module = llvm.Class()
|
||||||
Module.include.add("llvm/Module.h")
|
Module.include.add("llvm/Module.h")
|
||||||
|
|
||||||
|
# Enumerators
|
||||||
|
Endianness = Module.Enum('AnyEndianness', 'LittleEndian', 'BigEndian')
|
||||||
|
PointerSize = Module.Enum('AnyPointerSize', 'Pointer32', 'Pointer64')
|
||||||
|
|
||||||
|
# Constructors & Destructors
|
||||||
new = Module.new(StringRef.From(str), LLVMContext.Ref)
|
new = Module.new(StringRef.From(str), LLVMContext.Ref)
|
||||||
delete = Module.delete()
|
delete = Module.delete()
|
||||||
|
|
||||||
|
# Module Level Accessor
|
||||||
getModuleIdentifier = Module.method(ConstStdString.To(str))
|
getModuleIdentifier = Module.method(ConstStdString.To(str))
|
||||||
|
getDataLayout = Module.method(ConstStdString.To(str))
|
||||||
|
getTargetTriple = Module.method(ConstStdString.To(str))
|
||||||
|
getEndianness = Module.method(Endianness)
|
||||||
|
getPointerSize = Module.method(PointerSize)
|
||||||
|
getContext = Module.method(LLVMContext.Ref)
|
||||||
|
getModuleInlineAsm = Module.method(ConstStdString.To(str))
|
||||||
|
|
||||||
|
# Module Level Mutators
|
||||||
setModuleIdentifier = Module.method(Void, StringRef.From(str))
|
setModuleIdentifier = Module.method(Void, StringRef.From(str))
|
||||||
setDataLayout = Module.method(Void, StringRef.From(str))
|
setDataLayout = Module.method(Void, StringRef.From(str))
|
||||||
setTargetTriple = Module.method(Void, StringRef.From(str))
|
setTargetTriple = Module.method(Void, StringRef.From(str))
|
||||||
setModuleInlineAsm = Module.method(Void, StringRef.From(str))
|
setModuleInlineAsm = Module.method(Void, StringRef.From(str))
|
||||||
appendModuleInlineAsm = Module.method(Void, StringRef.From(str))
|
appendModuleInlineAsm = Module.method(Void, StringRef.From(str))
|
||||||
getContext = Module.method(LLVMContext.Ref)
|
|
||||||
|
# Function Accessors
|
||||||
|
#getOrInsertFunction = Module.method(Constant, StringRef.From(str), FunctionType.Pointer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Utilities
|
||||||
dump = Module.method(Void)
|
dump = Module.method(Void)
|
||||||
print_ = Module.method(Void, raw_svector_ostream_helper.Ref,
|
print_ = Module.method(Void, raw_svector_ostream_helper.Ref,
|
||||||
AssemblyAnnotationWriter.Pointer)
|
AssemblyAnnotationWriter.Pointer)
|
||||||
print_.realname = 'print'
|
print_.realname = 'print'
|
||||||
#getOrInsertFunction = Module.method(Constant, StringRef.From(str), FunctionType.Pointer)
|
dropAllReferences = Module.method(Void)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue