mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #8596 from huonw/symbol-list-3
Use IRGen's LinkInfo in TBDGen.
This commit is contained in:
@@ -550,7 +550,9 @@ static bool performCompile(std::unique_ptr<CompilerInstance> &Instance,
|
||||
}
|
||||
|
||||
if (Action == FrontendOptions::EmitTBD) {
|
||||
return writeTBD(Instance->getMainModule(), opts.getSingleOutputFilename());
|
||||
auto hasMultipleIRGenThreads = Invocation.getSILOptions().NumThreads > 1;
|
||||
return writeTBD(Instance->getMainModule(), hasMultipleIRGenThreads,
|
||||
opts.getSingleOutputFilename());
|
||||
}
|
||||
|
||||
assert(Action >= FrontendOptions::EmitSILGen &&
|
||||
@@ -795,10 +797,15 @@ static bool performCompile(std::unique_ptr<CompilerInstance> &Instance,
|
||||
}
|
||||
|
||||
if (opts.ValidateTBDAgainstIR) {
|
||||
bool validationError =
|
||||
PrimarySourceFile ? validateTBD(PrimarySourceFile, *IRModule)
|
||||
: validateTBD(Instance->getMainModule(), *IRModule);
|
||||
if (validationError)
|
||||
auto hasMultipleIRGenThreads = Invocation.getSILOptions().NumThreads > 1;
|
||||
bool error;
|
||||
if (PrimarySourceFile)
|
||||
error =
|
||||
validateTBD(PrimarySourceFile, *IRModule, hasMultipleIRGenThreads);
|
||||
else
|
||||
error = validateTBD(Instance->getMainModule(), *IRModule,
|
||||
hasMultipleIRGenThreads);
|
||||
if (error)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user