[LTO API] add lto_codegen_set_should_internalize.
When debugging LTO issues with ld64, we use -save-temps to save the merged
optimized bitcode file, then invoke ld64 again on the single bitcode file.
The saved bitcode file is already internalized, so we can call
lto_codegen_set_should_internalize and skip running internalization again.
rdar://20227235
llvm-svn: 235211
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h
index c6acdad..2f3aac7 100644
--- a/llvm/include/llvm-c/lto.h
+++ b/llvm/include/llvm-c/lto.h
@@ -40,7 +40,7 @@
* @{
*/
-#define LTO_API_VERSION 13
+#define LTO_API_VERSION 14
/**
* \since prior to LTO_API_VERSION=3
@@ -548,6 +548,16 @@
extern void
lto_initialize_disassembler(void);
+/**
+ * Sets if we should run internalize pass during optimization and code
+ * generation.
+ *
+ * \since prior to LTO_API_VERSION=14
+ */
+extern void
+lto_codegen_set_should_internalize(lto_code_gen_t cg,
+ lto_bool_t ShouldInternalize);
+
#ifdef __cplusplus
}
#endif