8.16.0.4
1 Module
procedure
(llvm-module module-name) → LLVMModuleRef?
module-name : string?
llvm-module returns a module, the core concept in LLVM. We puts global variables, functions, and type definitions in module.
procedure
(llvm-module-verify module) → boolean?
module : LLVMModuleRef?
verify given module
procedure
(llvm-module->string module) → string?
module : LLVMModuleRef?
convert given module as string
procedure
(llvm-add-function module function-name function-type) → LLVMValueRef? module : LLVMModuleRef? function-name : string? function-type : LLVMTypeRef?
Add function into given module, return a function value. The function name is given by function-name, the function type is given by function-type.
procedure
(llvm-add-global module var-type var-name) → LLVMValueRef?
module : LLVMModuleRef? var-type : LLVMTypeRef? var-name : string?
Add a global variable into given module.
procedure
(llvm-get-named-global module global-variable-name) → LLVMValueRef? module : LLVMModuleRef? global-variable-name : string?
Get global variable reference by its name.
procedure
(llvm-write-bitcode-to-file module file-path) → void? module : LLVMModuleRef? file-path : string?
Write module as content of file-path.