summaryrefslogtreecommitdiffstats
path: root/include/llvm-c/lto.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm-c/lto.h')
-rw-r--r--include/llvm-c/lto.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/include/llvm-c/lto.h b/include/llvm-c/lto.h
index 049c4d7..51079896 100644
--- a/include/llvm-c/lto.h
+++ b/include/llvm-c/lto.h
@@ -40,7 +40,7 @@ typedef bool lto_bool_t;
* @{
*/
-#define LTO_API_VERSION 10
+#define LTO_API_VERSION 11
/**
* \since prior to LTO_API_VERSION=3
@@ -79,14 +79,15 @@ typedef enum {
typedef enum {
LTO_CODEGEN_PIC_MODEL_STATIC = 0,
LTO_CODEGEN_PIC_MODEL_DYNAMIC = 1,
- LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC = 2
+ LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC = 2,
+ LTO_CODEGEN_PIC_MODEL_DEFAULT = 3
} lto_codegen_model;
/** opaque reference to a loaded object module */
-typedef struct LTOModule* lto_module_t;
+typedef struct LLVMOpaqueLTOModule *lto_module_t;
/** opaque reference to a code generator */
-typedef struct LTOCodeGenerator* lto_code_gen_t;
+typedef struct LLVMOpaqueLTOCodeGenerator *lto_code_gen_t;
#ifdef __cplusplus
extern "C" {
@@ -374,6 +375,14 @@ lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model);
extern void
lto_codegen_set_cpu(lto_code_gen_t cg, const char *cpu);
+/**
+ * Sets attributes for the cpu to generate code for.
+ *
+ * \since LTO_API_VERSION=11
+ */
+extern void
+lto_codegen_set_attr(lto_code_gen_t cg, const char *attr);
+
/**
* Sets the location of the assembler tool to run. If not set, libLTO
@@ -394,8 +403,9 @@ lto_codegen_set_assembler_args(lto_code_gen_t cg, const char **args,
int nargs);
/**
- * Tells LTO optimization passes that this symbol must be preserved
- * because it is referenced by native code or a command line option.
+ * 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.
*
* \since prior to LTO_API_VERSION=3
*/