Skip to content

Commit deb4541

Browse files
committed
[move-function] Move diagnostics in front of the flag.
This is safe to do since: 1. _move is already an always emit into client transparent function, so no ABI impact comes from it. 2. _move is underscored so it is a non-stable stdlib API meaning we aren't providing any guarantees here. 3. Code that doesn't use _move will not be effected by this so there isn't an impact on other code.
1 parent 258986a commit deb4541

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

lib/SILOptimizer/Mandatory/MoveFunctionCanonicalization.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,6 @@ class MoveFunctionCanonicalization : public SILFunctionTransform {
272272
void run() override {
273273
auto *fn = getFunction();
274274

275-
// If we do not have experimental move only enabled, do not emit
276-
// diagnostics.
277-
if (!astContext.LangOpts.EnableExperimentalMoveOnly)
278-
return;
279-
280275
// Don't rerun diagnostics on deserialized functions.
281276
if (getFunction()->wasDeserializedCanonical())
282277
return;

lib/SILOptimizer/Mandatory/MoveKillsCopyableAddressesChecker.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -961,11 +961,6 @@ class MoveKillsCopyableAddressesCheckerPass : public SILFunctionTransform {
961961
auto *fn = getFunction();
962962
auto &astContext = fn->getASTContext();
963963

964-
// If we do not have experimental move only enabled, do not emit
965-
// diagnostics.
966-
if (!astContext.LangOpts.EnableExperimentalMoveOnly)
967-
return;
968-
969964
// Don't rerun diagnostics on deserialized functions.
970965
if (getFunction()->wasDeserializedCanonical())
971966
return;

lib/SILOptimizer/Mandatory/MoveKillsCopyableValuesChecker.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,6 @@ class MoveKillsCopyableValuesCheckerPass : public SILFunctionTransform {
431431
auto *fn = getFunction();
432432
auto &astContext = fn->getASTContext();
433433

434-
// If we do not have experimental move only enabled, do not emit
435-
// diagnostics.
436-
if (!astContext.LangOpts.EnableExperimentalMoveOnly)
437-
return;
438-
439434
// Don't rerun diagnostics on deserialized functions.
440435
if (getFunction()->wasDeserializedCanonical())
441436
return;

0 commit comments

Comments
 (0)