From 3029a0c56a1e4249746ff6b54d825e88fee6cddf Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 9 Apr 2012 05:26:48 +0000 Subject: Add a hook to turn on the internalize pass through the LTO interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154306 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto/lto.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/lto/lto.cpp') 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). -- cgit v1.2.3