diff --git a/include/swift/AST/ASTContext.h b/include/swift/AST/ASTContext.h index 0879139474e..ddb53ceee39 100644 --- a/include/swift/AST/ASTContext.h +++ b/include/swift/AST/ASTContext.h @@ -742,9 +742,6 @@ public: FuncDecl *getMakeInvocationEncoderOnDistributedActorSystem( AbstractFunctionDecl *thunk) const; - /// Indicates whether move-only / noncopyable types are supported. - bool supportsMoveOnlyTypes() const; - // Retrieve the declaration of // DistributedInvocationEncoder.recordGenericSubstitution(_:). // diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index bfc0114735a..05e7ffa651a 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -6529,8 +6529,3 @@ Type ASTContext::getNamedSwiftType(ModuleDecl *module, StringRef name) { return nominalDecl->getDeclaredType(); return decl->getDeclaredInterfaceType(); } - -bool ASTContext::supportsMoveOnlyTypes() const { - // currently the only thing holding back whether the types can appear is this. - return true; -} diff --git a/lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableAddressesChecker.cpp b/lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableAddressesChecker.cpp index 180e929ec60..858f2d17c5a 100644 --- a/lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableAddressesChecker.cpp +++ b/lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableAddressesChecker.cpp @@ -2463,10 +2463,6 @@ class ConsumeOperatorCopyableAddressesCheckerPass auto *fn = getFunction(); auto &astContext = fn->getASTContext(); - // Only run this pass if the move only language feature is enabled. - if (!astContext.supportsMoveOnlyTypes()) - return; - // Don't rerun diagnostics on deserialized functions. if (getFunction()->wasDeserializedCanonical()) return; diff --git a/lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableValuesChecker.cpp b/lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableValuesChecker.cpp index 4d2d115c216..1bea3833d19 100644 --- a/lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableValuesChecker.cpp +++ b/lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableValuesChecker.cpp @@ -553,10 +553,6 @@ class ConsumeOperatorCopyableValuesCheckerPass : public SILFunctionTransform { void run() override { auto *fn = getFunction(); - // Only run this pass if the move only language feature is enabled. - if (!fn->getASTContext().supportsMoveOnlyTypes()) - return; - // Don't rerun diagnostics on deserialized functions. if (fn->wasDeserializedCanonical()) return; diff --git a/lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerTester.cpp b/lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerTester.cpp index 334397919f3..ab75794bab6 100644 --- a/lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerTester.cpp +++ b/lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerTester.cpp @@ -78,10 +78,6 @@ class MoveOnlyAddressCheckerTesterPass : public SILFunctionTransform { void run() override { auto *fn = getFunction(); - // Only run this pass if the move only language feature is enabled. - if (!fn->getASTContext().supportsMoveOnlyTypes()) - return; - // Don't rerun diagnostics on deserialized functions. if (getFunction()->wasDeserializedCanonical()) return; diff --git a/lib/SILOptimizer/Mandatory/MoveOnlyBorrowToDestructureTester.cpp b/lib/SILOptimizer/Mandatory/MoveOnlyBorrowToDestructureTester.cpp index 983d016f8d5..b667dbba771 100644 --- a/lib/SILOptimizer/Mandatory/MoveOnlyBorrowToDestructureTester.cpp +++ b/lib/SILOptimizer/Mandatory/MoveOnlyBorrowToDestructureTester.cpp @@ -71,10 +71,6 @@ class MoveOnlyBorrowToDestructureTransformPass : public SILFunctionTransform { void run() override { auto *fn = getFunction(); - // Only run this pass if the move only language feature is enabled. - if (!fn->getASTContext().supportsMoveOnlyTypes()) - return; - // Don't rerun diagnostics on deserialized functions. if (getFunction()->wasDeserializedCanonical()) return; diff --git a/lib/SILOptimizer/Mandatory/MoveOnlyChecker.cpp b/lib/SILOptimizer/Mandatory/MoveOnlyChecker.cpp index 7b1847c2d4e..eec43b8f309 100644 --- a/lib/SILOptimizer/Mandatory/MoveOnlyChecker.cpp +++ b/lib/SILOptimizer/Mandatory/MoveOnlyChecker.cpp @@ -215,10 +215,6 @@ class MoveOnlyCheckerPass : public SILFunctionTransform { void run() override { auto *fn = getFunction(); - // Only run this pass if the move only language feature is enabled. - if (!fn->getASTContext().supportsMoveOnlyTypes()) - return; - // Don't rerun diagnostics on deserialized functions. if (getFunction()->wasDeserializedCanonical()) return; diff --git a/lib/SILOptimizer/Mandatory/MoveOnlyObjectCheckerTester.cpp b/lib/SILOptimizer/Mandatory/MoveOnlyObjectCheckerTester.cpp index 9cb4fb0ba29..b90ce72d565 100644 --- a/lib/SILOptimizer/Mandatory/MoveOnlyObjectCheckerTester.cpp +++ b/lib/SILOptimizer/Mandatory/MoveOnlyObjectCheckerTester.cpp @@ -75,10 +75,6 @@ class MoveOnlyObjectCheckerTesterPass : public SILFunctionTransform { void run() override { auto *fn = getFunction(); - // Only run this pass if the move only language feature is enabled. - if (!fn->getASTContext().supportsMoveOnlyTypes()) - return; - // Don't rerun diagnostics on deserialized functions. if (getFunction()->wasDeserializedCanonical()) return; diff --git a/lib/SILOptimizer/Mandatory/MoveOnlyTempAllocationFromLetTester.cpp b/lib/SILOptimizer/Mandatory/MoveOnlyTempAllocationFromLetTester.cpp index 8a172825a42..f51ad322f5e 100644 --- a/lib/SILOptimizer/Mandatory/MoveOnlyTempAllocationFromLetTester.cpp +++ b/lib/SILOptimizer/Mandatory/MoveOnlyTempAllocationFromLetTester.cpp @@ -34,10 +34,6 @@ struct MoveOnlyTempAllocationFromLetTester : SILFunctionTransform { void run() override { auto *fn = getFunction(); - // Only run this pass if the move only language feature is enabled. - if (!fn->getASTContext().supportsMoveOnlyTypes()) - return; - // Don't rerun diagnostics on deserialized functions. if (getFunction()->wasDeserializedCanonical()) return;