Skip to content

Commit 298911b

Browse files
committed
enum Kind -> Kind
1 parent e242a88 commit 298911b

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

include/swift/AST/AutoDiff.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,23 +141,23 @@ class ParsedAutoDiffParameter {
141141
enum class Kind { Named, Ordered, Self };
142142

143143
private:
144-
SourceLoc Loc;
145-
Kind Kind;
144+
SourceLoc loc;
145+
Kind kind;
146146
union Value {
147-
struct { Identifier Name; } Named;
148-
struct { unsigned Index; } Ordered;
149-
struct {} Self;
147+
struct { Identifier name; } Named;
148+
struct { unsigned index; } Ordered;
149+
struct {} self;
150150
Value(Identifier name) : Named({name}) {}
151151
Value(unsigned index) : Ordered({index}) {}
152152
Value() {}
153-
} V;
153+
} value;
154154

155155
public:
156-
ParsedAutoDiffParameter(SourceLoc loc, enum Kind kind, Value value)
157-
: Loc(loc), Kind(kind), V(value) {}
158-
159-
ParsedAutoDiffParameter(SourceLoc loc, enum Kind kind, unsigned index)
160-
: Loc(loc), Kind(kind), V(index) {}
156+
ParsedAutoDiffParameter(SourceLoc loc, Kind kind, Value value)
157+
: loc(loc), kind(kind), value(value) {}
158+
159+
ParsedAutoDiffParameter(SourceLoc loc, Kind kind, unsigned index)
160+
: loc(loc), kind(kind), value(index) {}
161161

162162
static ParsedAutoDiffParameter getNamedParameter(SourceLoc loc,
163163
Identifier name) {
@@ -174,20 +174,20 @@ class ParsedAutoDiffParameter {
174174
}
175175

176176
Identifier getName() const {
177-
assert(Kind == Kind::Named);
178-
return V.Named.Name;
177+
assert(kind == Kind::Named);
178+
return value.Named.name;
179179
}
180180

181181
unsigned getIndex() const {
182-
return V.Ordered.Index;
182+
return value.Ordered.index;
183183
}
184184

185-
enum Kind getKind() const {
186-
return Kind;
185+
Kind getKind() const {
186+
return kind;
187187
}
188188

189189
SourceLoc getLoc() const {
190-
return Loc;
190+
return loc;
191191
}
192192

193193
bool isEqual(const ParsedAutoDiffParameter &other) const {

0 commit comments

Comments
 (0)