Add an object module to the set of modules for which code will be generated. Returns true on error (check lto_get_error_message() for details).
Adds to a list of all global symbols that must exist in the final generated code. If a function is not listed, it might be inlined into every usage and optimized away.
Generates code for all added modules into one native object file. On success returns a pointer to a generated mach-o/ELF buffer and length set to the buffer size. The buffer is owned by the lto_code_gen_t and will be freed when lto_codegen_dispose() is called, or lto_codegen_compile() is called again. On failure, returns NULL (check lto_get_error_message() for details).
Generates code for all added modules into one native object file. The name of the file is written to name. Returns true on error.
Instantiates a code generator. Returns NULL on error (check lto_get_error_message() for details).
Sets options to help debug codegen bugs.
Frees all code generator and all memory it internally allocated. Upon return the lto_code_gen_t is no longer valid.
Sets extra arguments that libLTO should pass to the assembler.
Sets the location of the assembler tool to run. If not set, libLTO will use gcc to invoke the assembler.
Sets the cpu to generate code for.
Sets if debug info should be generated. Returns true on error (check lto_get_error_message() for details).
Sets which PIC code model to generated. Returns true on error (check lto_get_error_message() for details).
Writes a new object file at the specified path that contains the merged contents of all modules added so far. Returns true on error (check lto_get_error_message() for details).
Returns the last error string or NULL if last operation was successful.
Returns a printable string.
Initializes LLVM disassemblers. FIXME: This doesn't really belong here.
Loads an object file from disk. Returns NULL on error (check lto_get_error_message() for details).
Loads an object file from disk. The seek point of fd is not preserved. Returns NULL on error (check lto_get_error_message() for details).
Loads an object file from disk. The seek point of fd is not preserved. Returns NULL on error (check lto_get_error_message() for details).
Loads an object file from memory. Returns NULL on error (check lto_get_error_message() for details).
Frees all memory internally allocated by the module. Upon return the lto_module_t is no longer valid.
Returns the number of symbols in the object module.
Returns the attributes of the ith symbol in the object module.
Returns the name of the ith symbol in the object module.
Returns triple string which the object module was compiled under.
Checks if a file is a loadable object file.
Checks if a file is a loadable object compiled for requested target.
Checks if a buffer is a loadable object file.
Checks if a buffer is a loadable object compiled for requested target.
Sets triple string with which the object will be codegened.
@defgroup LLVMCLTO LTO @ingroup LLVMC
opaque reference to a code generator
opaque reference to a loaded object module