mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[deserialization] When linking functions, return failure if we get back a declaration.
We consider linking to only succeed if we actually convert a declaration into a definition. Swift SVN r15070
This commit is contained in:
@@ -257,7 +257,7 @@ bool SILModule::linkFunction(SILFunction *Fun, SILModule::LinkingMode Mode) {
|
||||
bool LinkAll = Mode == LinkingMode::LinkAll;
|
||||
// First attempt to link in Fun. If we fail, bail.
|
||||
auto NewFn = SILLoader->lookupSILFunction(Fun);
|
||||
if (!NewFn)
|
||||
if (!NewFn || NewFn->empty())
|
||||
return false;
|
||||
++NumFuncLinked;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user