mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-07 13:09:52 +00:00
Delay context construction to when/if it is needed in gold plugin (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255146 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a63df07eda
commit
522f45d99c
@ -900,9 +900,6 @@ static ld_plugin_status allSymbolsReadHook(raw_fd_ostream *ApiFile) {
|
||||
if (Modules.empty())
|
||||
return LDPS_OK;
|
||||
|
||||
LLVMContext Context;
|
||||
Context.setDiagnosticHandler(diagnosticHandlerForContext, nullptr, true);
|
||||
|
||||
// If we are doing ThinLTO compilation, simply build the combined
|
||||
// function index/summary and emit it. We don't need to parse the modules
|
||||
// and link them in this case.
|
||||
@ -937,6 +934,9 @@ static ld_plugin_status allSymbolsReadHook(raw_fd_ostream *ApiFile) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
LLVMContext Context;
|
||||
Context.setDiagnosticHandler(diagnosticHandlerForContext, nullptr, true);
|
||||
|
||||
std::unique_ptr<Module> Combined(new Module("ld-temp.o", Context));
|
||||
Linker L(*Combined, diagnosticHandler);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user