mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Prespecialization: reduce the strength of an assertion.
If we find a specialization within the current module, it's okay if it has a body. This can come up if we compile something with optimizations and then compile the resulting SIL (or SIB) without optimizations.
This commit is contained in:
@@ -135,15 +135,14 @@ bool UsePrespecialized::replaceByPrespecialized(SILFunction &F) {
|
||||
<< PrevF << "\n");
|
||||
if (!PrevF)
|
||||
continue;
|
||||
assert(PrevF->isExternalDeclaration() &&
|
||||
"Prespecialized function should be an external declaration");
|
||||
NewF = PrevF;
|
||||
}
|
||||
|
||||
if (!NewF)
|
||||
continue;
|
||||
|
||||
assert(NewF->isExternalDeclaration() &&
|
||||
"Prespecialized function should be an external declaration");
|
||||
|
||||
// An existing specialization was found.
|
||||
DEBUG(llvm::dbgs() << "Found a specialization of " << ReferencedF->getName()
|
||||
<< " : " << NewF->getName() << "\n");
|
||||
|
||||
Reference in New Issue
Block a user