[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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren
2015-04-17 17:10:09 +00:00
parent c7b16819e8
commit 44b800f44d
5 changed files with 22 additions and 2 deletions

View File

@@ -333,3 +333,8 @@ void lto_codegen_debug_options(lto_code_gen_t cg, const char *opt) {
}
unsigned int lto_api_version() { return LTO_API_VERSION; }
void lto_codegen_set_should_internalize(lto_code_gen_t cg,
bool ShouldInternalize) {
unwrap(cg)->setShouldInternalize(ShouldInternalize);
}