Skip to content

Commit

Permalink
Don't run internalize if we're outputing bit-code and not an object f…
Browse files Browse the repository at this point in the history
…ile.

The problem with running internalize before we're ready to output an object file
is that it may change a 'weak' symbol into an internal one, but that symbol
could be needed by an external object file --- e.g. with arclite.

<rdar://problem/14334895>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185882 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
isanbard committed Jul 8, 2013
1 parent 6cf7246 commit c6fbaa9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/lto/LTOCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ bool LTOCodeGenerator::writeMergedModules(const char *path,
if (determineTarget(errMsg))
return true;

// mark which symbols can not be internalized
applyScopeRestrictions();
// Run the verifier on the merged modules.
PassManager passes;
passes.add(createVerifierPass());
passes.run(*_linker.getModule());

// create output file
std::string ErrInfo;
Expand Down

0 comments on commit c6fbaa9

Please sign in to comment.