LLVM API Documentation

Typedefs | Enumerations | Functions
Link Time Optimization
LLVM-C: C interface to LLVM
Collaboration diagram for Link Time Optimization:

Typedefs

typedef void * llvm_lto_t
 This provides a dummy type for pointers to the LTO object.
typedef enum llvm_lto_status llvm_lto_status_t

Enumerations

enum  llvm_lto_status {
  LLVM_LTO_UNKNOWN, LLVM_LTO_OPT_SUCCESS, LLVM_LTO_READ_SUCCESS, LLVM_LTO_READ_FAILURE,
  LLVM_LTO_WRITE_FAILURE, LLVM_LTO_NO_TARGET, LLVM_LTO_NO_WORK, LLVM_LTO_MODULE_MERGE_FAILURE,
  LLVM_LTO_ASM_FAILURE, LLVM_LTO_NULL_OBJECT
}

Functions

llvm_lto_t llvm_create_optimizer (void)
void llvm_destroy_optimizer (llvm_lto_t lto)
llvm_lto_status_t llvm_read_object_file (llvm_lto_t lto, const char *input_filename)
llvm_lto_status_t llvm_optimize_modules (llvm_lto_t lto, const char *output_filename)

Typedef Documentation

This provides a C-visible enumerator to manage status codes. This should map exactly onto the C++ enumerator LTOStatus.

typedef void* llvm_lto_t

This provides a dummy type for pointers to the LTO object.

Definition at line 31 of file LinkTimeOptimizer.h.


Enumeration Type Documentation

This provides a C-visible enumerator to manage status codes. This should map exactly onto the C++ enumerator LTOStatus.

Enumerator:
LLVM_LTO_UNKNOWN 
LLVM_LTO_OPT_SUCCESS 
LLVM_LTO_READ_SUCCESS 
LLVM_LTO_READ_FAILURE 
LLVM_LTO_WRITE_FAILURE 
LLVM_LTO_NO_TARGET 
LLVM_LTO_NO_WORK 
LLVM_LTO_MODULE_MERGE_FAILURE 
LLVM_LTO_ASM_FAILURE 
LLVM_LTO_NULL_OBJECT 

Definition at line 35 of file LinkTimeOptimizer.h.


Function Documentation

This provides C interface to initialize link time optimizer. This allows linker to use dlopen() interface to dynamically load LinkTimeOptimizer. extern "C" helps, because dlopen() interface uses name to find the symbol.

llvm_lto_status_t llvm_optimize_modules ( llvm_lto_t  lto,
const char *  output_filename 
)
llvm_lto_status_t llvm_read_object_file ( llvm_lto_t  lto,
const char *  input_filename 
)