@@ -1751,8 +1751,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
17511751 " [dynamically_replaceable] function" );
17521752
17531753 // 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.
17561757 if (F.getModule ().getStage () >= SILStage::Canonical) {
17571758 if (RefF->isExternalDeclaration ()) {
17581759 require (SingleFunction ||
@@ -5560,20 +5561,13 @@ void SILModule::verify() const {
55605561 // Uniquing set to catch symbol name collisions.
55615562 llvm::DenseSet<StringRef> symbolNames;
55625563
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-
55705564 // Check all functions.
55715565 for (const SILFunction &f : *this ) {
55725566 if (!symbolNames.insert (f.getName ()).second ) {
55735567 llvm::errs () << " Symbol redefined: " << f.getName () << " !\n " ;
55745568 assert (false && " triggering standard assertion failure routine" );
55755569 }
5576- f.verify (SingleFunction );
5570+ f.verify (/* singleFunction */ false );
55775571 }
55785572
55795573 // Check all globals.
0 commit comments