diff options
| author | Manman Ren <manman.ren@gmail.com> | 2015-04-17 17:10:09 +0000 |
|---|---|---|
| committer | Manman Ren <manman.ren@gmail.com> | 2015-04-17 17:10:09 +0000 |
| commit | ce0a0665241c116cf693936c11924ea756560951 (patch) | |
| tree | 0cbc2488d48a88616f0630584200dc462aaa065f /llvm/lib/LTO | |
| parent | 2161c49a4e8dd6b3e116a08719545ccd4ec1044f (diff) | |
| download | bcm5719-llvm-ce0a0665241c116cf693936c11924ea756560951.tar.gz bcm5719-llvm-ce0a0665241c116cf693936c11924ea756560951.zip | |
[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
Diffstat (limited to 'llvm/lib/LTO')
| -rw-r--r-- | llvm/lib/LTO/LTOCodeGenerator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index b4a70119cc2..16718d7ce64 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -82,6 +82,7 @@ void LTOCodeGenerator::initialize() { DiagHandler = nullptr; DiagContext = nullptr; OwnedModule = nullptr; + ShouldInternalize = true; initializeLTOPasses(); } @@ -464,7 +465,7 @@ static void accumulateAndSortLibcalls(std::vector<StringRef> &Libcalls, } void LTOCodeGenerator::applyScopeRestrictions() { - if (ScopeRestrictionsDone) + if (ScopeRestrictionsDone || !ShouldInternalize) return; Module *mergedModule = IRLinker.getModule(); |

