Diagnostic severity.
\since prior to LTO_API_VERSION=3
\since prior to LTO_API_VERSION=3
\since prior to LTO_API_VERSION=3
Returns the runtime API version.
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 there, it might be inlined into every usage and optimized away.
Generates code for all added modules into one native object file. This calls lto_codegen_optimize then lto_codegen_compile_optimized.
Generates code for the optimized merged module into one native object file. It will not run any IR optimizations on the merged module.
Generates code for all added modules into one native object file. This calls lto_codegen_optimize then lto_codegen_compile_optimized (instead of returning a generated mach-o/ELF buffer, it writes to a file).
Instantiates a code generator. Returns NULL on error (check lto_get_error_message() for details).
\brief Instantiate a code generator in its own context.
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.
Runs optimization for the merged module. Returns true on error.
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).
Set a diagnostic handler and the related context (void *). This is more general than lto_get_error_message, as the diagnostic handler can be called at anytime within lto.
Sets the object module for code generation. This will transfer the ownership of the module to the code generator.
Sets which PIC code model to generated. Returns true on error (check lto_get_error_message() for details).
\brief Set whether to embed uselists in bitcode.
Sets if we should run internalize pass during optimization and code generation.
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).
Loads an object file from memory with an extra path argument. Returns NULL on error (check lto_get_error_message() for details).
\brief Loads an object file in the codegen context.
\brief Loads an object file in its own context.
Frees all memory internally allocated by the module. Upon return the lto_module_t is no longer valid.
Returns the module's linker options.
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 file.
Checks if a buffer is a loadable object compiled for requested target.
Test if a module has support for ThinLTO linking.
Sets triple string with which the object will be codegened.
Adds a symbol to the list of global symbols that are cross-referenced between ThinLTO files. If the ThinLTO CodeGenerator can ensure that every references from a ThinLTO module to this symbol is optimized away, then the symbol can be discarded.
Add a module to a ThinLTO code generator. Identifier has to be unique among all the modules in a code generator. The data buffer stays owned by the client, and is expected to be available for the entire lifetime of the thinlto_code_gen_t it is added to.
Adds a symbol to the list of global symbols that must exist in the final generated code. If a function is not listed there, it might be inlined into every usage and optimized away. For every single module, the functions referenced from code outside of the ThinLTO modules need to be added here.
Disable CodeGen, only run the stages till codegen and stop. The output will be bitcode.
Frees the generator and all memory it internally allocated. Upon return the thinlto_code_gen_t is no longer valid.
Optimize and codegen all the modules added to the codegenerator using ThinLTO. Resulting objects are accessible using thinlto_module_get_object().
Sets the path to a directory to use as a cache storage for incremental build. Setting this activates caching.
Sets the expiration (in seconds) for an entry in the cache. An unspecified default value will be applied. A value of 0 will be ignored.
Sets the cache pruning interval (in seconds). A negative value disable the pruning. An unspecified default value will be applied, and a value of 0 will be ignored.
Perform CodeGen only: disable all other stages.
Sets the cpu to generate code for.
Sets the maximum cache size that can be persistent across build, in terms of percentage of the available space on the the disk. Set to 100 to indicate no limit, 50 to indicate that the cache size will not be left over half the available space. A value over 100 will be reduced to 100, a value of 0 will be ignored. An unspecified default value will be applied.
Sets which PIC code model to generate. Returns true on error (check lto_get_error_message() for details).
Sets the path to a directory to use as a storage for temporary bitcode files. The intention is to make the bitcode files available for debugging at various stage of the pipeline.
Instantiates a ThinLTO code generator. Returns NULL on error (check lto_get_error_message() for details).
Parse -mllvm style debug options.
Returns the number of object files produced by the ThinLTO CodeGenerator.
Returns a reference to the ith object file produced by the ThinLTO CodeGenerator.
@defgroup LLVMCLTO LTO @ingroup LLVMC
opaque reference to a code generator
opaque reference to a loaded object module
opaque reference to a thin code generator
Type to wrap a single object returned by ThinLTO.