{"size": 960, "ext": "scrbl", "max_stars_repo_path": "scribblings/module.scrbl", "max_stars_repo_name": "failed-dragon-slayer/racket-llvm", "max_stars_repo_stars_event_min_datetime": "2022-01-03T15:18:24.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-21T23:31:03.000Z", "max_issues_repo_path": "scribblings/module.scrbl", "max_issues_repo_name": "failed-dragon-slayer/racket-llvm13", "max_issues_repo_issues_event_min_datetime": "2022-01-21T00:25:45.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-25T01:15:39.000Z", "max_forks_repo_path": "scribblings/module.scrbl", "max_forks_repo_name": "failed-dragon-slayer/racket-llvm", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 26.6666666667, "max_line_length": 150, "alphanum_fraction": 0.7114583333}
#lang scribble/manual
@require[@for-label[racket-llvm
                    racket/base]]

@title{Module}

@defproc[(llvm-module [module-name string?])
    LLVMModuleRef?
]{
    @racket[llvm-module] returns a module, the core concept in LLVM. We puts global variables, functions, and type definitions in module.
}

@defproc[(llvm-module-verify [module LLVMModuleRef?])
    boolean?
]{
    verify given module
}

@defproc[(llvm-module->string [module LLVMModuleRef?])
    string?
]{
    convert given module as string
}

@defproc[(llvm-add-function [module LLVMModuleRef?] [function-name string?] [function-type LLVMTypeRef?])
    LLVMValueRef?
]{
    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.
}

@defproc[(llvm-add-global [module LLVMModuleRef?] [var-type LLVMTypeRef?] [var-name string?])
    LLVMValueRef?
]{
    Add a global variable into given module
}
