mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SILOpt] Removed unreachable bailouts.
Now that supportsMoveOnlyTypes is always true, these bailouts can't be reached. Delete the bailouts and the predicate.
This commit is contained in:
@@ -742,9 +742,6 @@ public:
|
|||||||
FuncDecl *getMakeInvocationEncoderOnDistributedActorSystem(
|
FuncDecl *getMakeInvocationEncoderOnDistributedActorSystem(
|
||||||
AbstractFunctionDecl *thunk) const;
|
AbstractFunctionDecl *thunk) const;
|
||||||
|
|
||||||
/// Indicates whether move-only / noncopyable types are supported.
|
|
||||||
bool supportsMoveOnlyTypes() const;
|
|
||||||
|
|
||||||
// Retrieve the declaration of
|
// Retrieve the declaration of
|
||||||
// DistributedInvocationEncoder.recordGenericSubstitution(_:).
|
// DistributedInvocationEncoder.recordGenericSubstitution(_:).
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -6529,8 +6529,3 @@ Type ASTContext::getNamedSwiftType(ModuleDecl *module, StringRef name) {
|
|||||||
return nominalDecl->getDeclaredType();
|
return nominalDecl->getDeclaredType();
|
||||||
return decl->getDeclaredInterfaceType();
|
return decl->getDeclaredInterfaceType();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ASTContext::supportsMoveOnlyTypes() const {
|
|
||||||
// currently the only thing holding back whether the types can appear is this.
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -2463,10 +2463,6 @@ class ConsumeOperatorCopyableAddressesCheckerPass
|
|||||||
auto *fn = getFunction();
|
auto *fn = getFunction();
|
||||||
auto &astContext = fn->getASTContext();
|
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.
|
// Don't rerun diagnostics on deserialized functions.
|
||||||
if (getFunction()->wasDeserializedCanonical())
|
if (getFunction()->wasDeserializedCanonical())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -553,10 +553,6 @@ class ConsumeOperatorCopyableValuesCheckerPass : public SILFunctionTransform {
|
|||||||
void run() override {
|
void run() override {
|
||||||
auto *fn = getFunction();
|
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.
|
// Don't rerun diagnostics on deserialized functions.
|
||||||
if (fn->wasDeserializedCanonical())
|
if (fn->wasDeserializedCanonical())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -78,10 +78,6 @@ class MoveOnlyAddressCheckerTesterPass : public SILFunctionTransform {
|
|||||||
void run() override {
|
void run() override {
|
||||||
auto *fn = getFunction();
|
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.
|
// Don't rerun diagnostics on deserialized functions.
|
||||||
if (getFunction()->wasDeserializedCanonical())
|
if (getFunction()->wasDeserializedCanonical())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -71,10 +71,6 @@ class MoveOnlyBorrowToDestructureTransformPass : public SILFunctionTransform {
|
|||||||
void run() override {
|
void run() override {
|
||||||
auto *fn = getFunction();
|
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.
|
// Don't rerun diagnostics on deserialized functions.
|
||||||
if (getFunction()->wasDeserializedCanonical())
|
if (getFunction()->wasDeserializedCanonical())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -215,10 +215,6 @@ class MoveOnlyCheckerPass : public SILFunctionTransform {
|
|||||||
void run() override {
|
void run() override {
|
||||||
auto *fn = getFunction();
|
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.
|
// Don't rerun diagnostics on deserialized functions.
|
||||||
if (getFunction()->wasDeserializedCanonical())
|
if (getFunction()->wasDeserializedCanonical())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -75,10 +75,6 @@ class MoveOnlyObjectCheckerTesterPass : public SILFunctionTransform {
|
|||||||
void run() override {
|
void run() override {
|
||||||
auto *fn = getFunction();
|
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.
|
// Don't rerun diagnostics on deserialized functions.
|
||||||
if (getFunction()->wasDeserializedCanonical())
|
if (getFunction()->wasDeserializedCanonical())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -34,10 +34,6 @@ struct MoveOnlyTempAllocationFromLetTester : SILFunctionTransform {
|
|||||||
void run() override {
|
void run() override {
|
||||||
auto *fn = getFunction();
|
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.
|
// Don't rerun diagnostics on deserialized functions.
|
||||||
if (getFunction()->wasDeserializedCanonical())
|
if (getFunction()->wasDeserializedCanonical())
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user