Files
swift-mirror/lib/SIL/Utils/ConcurrencyUtils.cpp
Michael Gottesman ce162afd9d [silgen] Use Builtin.ImplicitActor instead of Optional<any Actor> to represent the implicit isolated parameter.
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)
2025-10-17 11:33:27 -07:00

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;
}