From: Bill Wendling Date: Mon, 8 Jul 2013 23:23:03 +0000 (+0000) Subject: Don't run internalize if we're outputing bit-code and not an object file. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c6fbaa97016beb90a7508dd6442c83565c27c241;p=oota-llvm.git Don't run internalize if we're outputing bit-code and not an object file. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185882 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index 022a04c178e..7616aa3d25a 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -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;