Skip to content

Commit b1fbe4e

Browse files
committed
[BitwiseCopyable] Remove underscore.
1 parent 016489e commit b1fbe4e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+196
-152
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7735,7 +7735,7 @@ ERROR(non_bitwise_copyable_type_cxx_nontrivial,none,
77357735
ERROR(non_bitwise_copyable_c_type_nontrivial,none,
77367736
"type with unrepresentable fields cannot derive conformance to 'BitwiseCopyable'", ())
77377737
NOTE(note_non_bitwise_copyable_c_type_add_attr,none,
7738-
"annotate the type __attribute__((__swift_attr__(\"_BitwiseCopyable\")))",())
7738+
"annotate the type __attribute__((__swift_attr__(\"BitwiseCopyable\")))",())
77397739
ERROR(non_bitwise_copyable_type_member,none,
77407740
"%select{stored property %2|associated value %2}1 of "
77417741
"'BitwiseCopyable'-conforming %kind3 has non-bitwise-copyable type %0",

include/swift/AST/KnownProtocols.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ PROTOCOL(FloatingPoint)
150150
INVERTIBLE_PROTOCOL_WITH_NAME(Name, #Name)
151151
#include "swift/ABI/InvertibleProtocols.def"
152152

153-
REPRESSIBLE_PROTOCOL_(BitwiseCopyable)
153+
REPRESSIBLE_PROTOCOL(BitwiseCopyable)
154154

155155
EXPRESSIBLE_BY_LITERAL_PROTOCOL(ExpressibleByArrayLiteral, "Array", false)
156156
EXPRESSIBLE_BY_LITERAL_PROTOCOL(ExpressibleByBooleanLiteral, "BooleanLiteralType", true)

lib/ClangImporter/ImportDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8028,7 +8028,7 @@ ClangImporter::Implementation::importSwiftAttrAttributes(Decl *MappedDecl) {
80288028
continue;
80298029
}
80308030

8031-
if (swiftAttr->getAttribute() == "_BitwiseCopyable") {
8031+
if (swiftAttr->getAttribute() == "BitwiseCopyable") {
80328032
auto *protocol =
80338033
SwiftContext.getProtocol(KnownProtocolKind::BitwiseCopyable);
80348034
auto *nominal = dyn_cast<NominalTypeDecl>(MappedDecl);

lib/SIL/IR/TypeLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3199,7 +3199,7 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
31993199
// conforming.
32003200
if (!nominal) {
32013201
llvm::errs()
3202-
<< "Non-nominal type without conformance to _BitwiseCopyable:\n"
3202+
<< "Non-nominal type without conformance to BitwiseCopyable:\n"
32033203
<< ty << "\n"
32043204
<< "within " << substType << "\n"
32053205
<< "of " << origType << "\n";
@@ -3310,7 +3310,7 @@ void TypeConverter::verifyTrivialLowering(const TypeLowering &lowering,
33103310
return true;
33113311
});
33123312
if (hasNoConformingArchetypeNode) {
3313-
llvm::errs() << "Non-trivial type with _BitwiseCopyable conformance!?:\n"
3313+
llvm::errs() << "Non-trivial type with BitwiseCopyable conformance!?:\n"
33143314
<< substType << "\n";
33153315
conformance.print(llvm::errs());
33163316
llvm::errs() << "\n"

stdlib/public/core/CommandLine.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ internal func _swift_stdlib_getUnsafeArgvArgc(_: UnsafeMutablePointer<Int32>)
2121
/// Command-line arguments for the current process.
2222
#if $BitwiseCopyable && $ConformanceSuppression
2323
@frozen // namespace
24-
public enum CommandLine : ~_BitwiseCopyable {
24+
public enum CommandLine : ~BitwiseCopyable {
2525
}
2626
#else
2727
@frozen // namespace
2828
public enum CommandLine {
2929
}
3030
@available(*, unavailable)
31-
extension CommandLine : _BitwiseCopyable {}
31+
extension CommandLine : BitwiseCopyable {}
3232
#endif
3333

3434
extension CommandLine {

stdlib/public/core/KeyPath.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,12 +1857,12 @@ internal struct RawKeyPathComponent {
18571857
}
18581858
}
18591859

1860-
internal func _pop<T : _BitwiseCopyable>(from: inout UnsafeRawBufferPointer,
1860+
internal func _pop<T : BitwiseCopyable>(from: inout UnsafeRawBufferPointer,
18611861
as type: T.Type) -> T {
18621862
let buffer = _pop(from: &from, as: type, count: 1)
18631863
return buffer.baseAddress.unsafelyUnwrapped.pointee
18641864
}
1865-
internal func _pop<T : _BitwiseCopyable>(from: inout UnsafeRawBufferPointer,
1865+
internal func _pop<T : BitwiseCopyable>(from: inout UnsafeRawBufferPointer,
18661866
as: T.Type,
18671867
count: Int) -> UnsafeBufferPointer<T> {
18681868
from = MemoryLayout<T>._roundingUpBaseToAlignment(from)
@@ -3482,7 +3482,7 @@ internal struct InstantiateKeyPathBuffer: KeyPathPatternVisitor {
34823482
}
34833483
return (baseAddress, misalign)
34843484
}
3485-
mutating func pushDest<T : _BitwiseCopyable>(_ value: T) {
3485+
mutating func pushDest<T : BitwiseCopyable>(_ value: T) {
34863486
let size = MemoryLayout<T>.size
34873487
let (baseAddress, misalign) = adjustDestForAlignment(of: T.self)
34883488
_withUnprotectedUnsafeBytes(of: value) {

stdlib/public/core/MemoryLayout.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
/// alignment: MemoryLayout<Point>.alignment)
4242
#if $BitwiseCopyable && $ConformanceSuppression
4343
@frozen // namespace
44-
public enum MemoryLayout<T: ~Copyable>: ~_BitwiseCopyable, Copyable {}
44+
public enum MemoryLayout<T: ~Copyable>: ~BitwiseCopyable, Copyable {}
4545
#else
4646
@frozen // namespace
4747
public enum MemoryLayout<T: ~Copyable>: Copyable {}
4848
@available(*, unavailable)
49-
extension MemoryLayout: _BitwiseCopyable {}
49+
extension MemoryLayout: BitwiseCopyable {}
5050
#endif
5151

5252
extension MemoryLayout where T: ~Copyable {

stdlib/public/core/Misc.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ func _rethrowsViaClosure(_ fn: () throws -> ()) rethrows {
175175
@_marker public protocol Escapable {}
176176

177177
#if $NoncopyableGenerics && $NonescapableTypes
178-
@_marker public protocol _BitwiseCopyable: ~Escapable { }
178+
@_marker public protocol BitwiseCopyable: ~Escapable { }
179179
#else
180-
@_marker public protocol _BitwiseCopyable { }
180+
@_marker public protocol BitwiseCopyable { }
181181
#endif
182+
183+
@available(*, unavailable)
184+
@_marker public protocol _BitwiseCopyable {}

stdlib/public/core/Optional.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ extension Optional: Copyable /* where Wrapped: Copyable */ {}
136136

137137
extension Optional: Sendable where Wrapped: ~Copyable & Sendable { }
138138

139-
extension Optional: _BitwiseCopyable where Wrapped: _BitwiseCopyable { }
139+
extension Optional: BitwiseCopyable where Wrapped: BitwiseCopyable { }
140140

141141
@_preInverseGenerics
142142
extension Optional: ExpressibleByNilLiteral where Wrapped: ~Copyable {

stdlib/public/core/Pointer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public protocol _Pointer:
3030
Strideable,
3131
_CustomDebugStringConvertibleOrNone,
3232
_CustomReflectableOrNone,
33-
_BitwiseCopyable
33+
BitwiseCopyable
3434
{
3535
/// A type that represents the distance between two pointers.
3636
typealias Distance = Int

0 commit comments

Comments
 (0)