@@ -1751,8 +1751,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1751
1751
" [dynamically_replaceable] function" );
1752
1752
1753
1753
// In canonical SIL, direct reference to a shared_external declaration
1754
- // is an error; we should have deserialized a body. In raw SIL, we may
1755
- // not have deserialized the body yet.
1754
+ // is an error; we should have deserialized a body. In raw SIL, including
1755
+ // the merge-modules phase, we may not have deserialized the body yet as we
1756
+ // may not have run the SILLinker pass.
1756
1757
if (F.getModule ().getStage () >= SILStage::Canonical) {
1757
1758
if (RefF->isExternalDeclaration ()) {
1758
1759
require (SingleFunction ||
@@ -5560,20 +5561,13 @@ void SILModule::verify() const {
5560
5561
// Uniquing set to catch symbol name collisions.
5561
5562
llvm::DenseSet<StringRef> symbolNames;
5562
5563
5563
- // When merging partial modules, we only link functions from the current
5564
- // module, without enabling "LinkAll" mode or running the SILLinker pass;
5565
- // in this case, we need to relax some of the checks.
5566
- bool SingleFunction = false ;
5567
- if (getOptions ().MergePartialModules )
5568
- SingleFunction = true ;
5569
-
5570
5564
// Check all functions.
5571
5565
for (const SILFunction &f : *this ) {
5572
5566
if (!symbolNames.insert (f.getName ()).second ) {
5573
5567
llvm::errs () << " Symbol redefined: " << f.getName () << " !\n " ;
5574
5568
assert (false && " triggering standard assertion failure routine" );
5575
5569
}
5576
- f.verify (SingleFunction );
5570
+ f.verify (/* singleFunction */ false );
5577
5571
}
5578
5572
5579
5573
// Check all globals.
0 commit comments