mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
NOTE: We are not performing any bitmasking at all now. This is so that we can
transition the code base/tests to expect Builtin.ImplicitActor instead
of Optional<any Actor>.
NOTE: The actual test changes are in the next commit. I did this to make it
easier to review the changes.
This should not have any user visible changes.
(cherry picked from commit 788abd0b96)
33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
//===--- ConcurrencyUtils.cpp ---------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "swift/SIL/ConcurrencyUtils.h"
|
|
|
|
#include "swift/SIL/SILBuilder.h"
|
|
#include "swift/SIL/SILLocation.h"
|
|
|
|
using namespace swift;
|
|
|
|
SILValue swift::clearImplicitActorBits(SILBuilder &b, SILLocation loc,
|
|
SILValue value, SILType finalType) {
|
|
if (!finalType)
|
|
finalType = SILType::getBuiltinImplicitActorType(b.getASTContext());
|
|
if (value->getType() == finalType)
|
|
return value;
|
|
return b.emitUncheckedValueCast(loc, value, finalType);
|
|
}
|
|
|
|
SILValue swift::setImplicitActorBits(SILBuilder &b, SILLocation loc,
|
|
SILValue value) {
|
|
return value;
|
|
}
|