LTO: Add API to choose whether to embed uselists
[oota-llvm.git] / include / llvm-c / lto.h
index 9d0d7263a589b8bcbf73ed1f4d14a50570e86cbe..1db077822ae223f238f47cba0fed36d0bb78bb7f 100644 (file)
@@ -40,7 +40,7 @@ typedef bool lto_bool_t;
  * @{
  */
 
-#define LTO_API_VERSION 14
+#define LTO_API_VERSION 15
 
 /**
  * \since prior to LTO_API_VERSION=3
@@ -558,6 +558,18 @@ extern void
 lto_codegen_set_should_internalize(lto_code_gen_t cg,
                                    lto_bool_t ShouldInternalize);
 
+/**
+ * \brief Set whether to embed uselists in bitcode.
+ *
+ * Sets whether \a lto_codegen_write_merged_modules() should embed uselists in
+ * output bitcode.  This should be turned on for all -save-temps output.
+ *
+ * \since LTO_API_VERSION=15
+ */
+extern void
+lto_codegen_set_should_embed_uselists(lto_code_gen_t cg,
+                                      lto_bool_t ShouldEmbedUselists);
+
 #ifdef __cplusplus
 }
 #endif