File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -2913,9 +2913,6 @@ class GenericTypeParamDecl : public AbstractTypeParamDecl {
2913
2913
// / func getNext() -> Element?
2914
2914
// / }
2915
2915
// / \endcode
2916
- // /
2917
- // / Every protocol has an implicitly-created associated type 'Self' that
2918
- // / describes a type that conforms to the protocol.
2919
2916
class AssociatedTypeDecl : public AbstractTypeParamDecl {
2920
2917
// / The location of the initial keyword.
2921
2918
SourceLoc KeywordLoc;
@@ -3875,6 +3872,14 @@ struct SelfReferenceKind {
3875
3872
// / protocol Drawable {
3876
3873
// / func draw()
3877
3874
// / }
3875
+ // /
3876
+ // / Every protocol has an implicitly-created 'Self' generic parameter that
3877
+ // / stands for a type that conforms to the protocol. For example,
3878
+ // /
3879
+ // / protocol Cloneable {
3880
+ // / func clone() -> Self
3881
+ // / }
3882
+ // /
3878
3883
class ProtocolDecl final : public NominalTypeDecl {
3879
3884
SourceLoc ProtocolLoc;
3880
3885
Original file line number Diff line number Diff line change
1
+ import ctypes
2
+
3
+ public struct MM {
4
+ public var m : ModRM
5
+ }
6
+
7
+ @inlinable public func f( _ m: MM ) -> UInt32 {
8
+ return m. m. rm
9
+ }
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-frontend %clang-importer-sdk %S/Inputs/inlinable_bitfields_other.swift -emit-module -emit-module-path %t/inlinable_bitfields_other.swiftmodule
3
+ // RUN: %target-swift-frontend %clang-importer-sdk -I %t %s -emit-ir -disable-llvm-optzns -O | %FileCheck %s -DINT=i%target-ptrsize
4
+
5
+ import inlinable_bitfields_other
6
+
7
+ public func g( _ m: MM ) -> UInt32 {
8
+ return f ( m)
9
+ }
10
+
11
+ // Just make sure this is a definition and not a declaration...
12
+
13
+ // CHECK: define internal i32 @"$ModRM$rm$getter"([[INT]] %.coerce)
You can’t perform that action at this time.
0 commit comments