summaryrefslogtreecommitdiff
path: root/tools/lto/lto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lto/lto.cpp')
-rw-r--r--tools/lto/lto.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp
index a7e633d14b..e523eb3901 100644
--- a/tools/lto/lto.cpp
+++ b/tools/lto/lto.cpp
@@ -183,6 +183,12 @@ void lto_codegen_add_must_preserve_symbol(lto_code_gen_t cg,
cg->addMustPreserveSymbol(symbol);
}
+/// lto_codegen_whole_program_optimization - Enable the internalize pass during
+/// LTO optimizations.
+void lto_codegen_whole_program_optimization(lto_code_gen_t cg) {
+ cg->enableInternalizePass();
+}
+
/// lto_codegen_write_merged_modules - Writes a new 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).