Skip to content

Commit 8cb268d

Browse files
committed
Reflection: Rename make_typeref to makeTypeRef, NFC
1 parent 36da6ba commit 8cb268d

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

include/swift/Reflection/TypeRef.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class BuiltinTypeRef final : public TypeRef {
7272

7373
template <typename Allocator>
7474
static const BuiltinTypeRef *create(Allocator &A, std::string MangledName) {
75-
return A.template make_typeref<BuiltinTypeRef>(MangledName);
75+
return A.template makeTypeRef<BuiltinTypeRef>(MangledName);
7676
}
7777

7878
const std::string &getMangledName() const {
@@ -118,7 +118,7 @@ class NominalTypeRef final : public TypeRef, public NominalTypeTrait {
118118
static const NominalTypeRef *create(Allocator &A,
119119
const std::string &MangledName,
120120
const TypeRef *Parent = nullptr) {
121-
return A.template make_typeref<NominalTypeRef>(MangledName, Parent);
121+
return A.template makeTypeRef<NominalTypeRef>(MangledName, Parent);
122122
}
123123

124124
static bool classof(const TypeRef *TR) {
@@ -142,9 +142,9 @@ class BoundGenericTypeRef final : public TypeRef, public NominalTypeTrait {
142142
create(Allocator &A, const std::string &MangledName,
143143
std::vector<const TypeRef *> GenericParams,
144144
const TypeRef *Parent = nullptr) {
145-
return A.template make_typeref<BoundGenericTypeRef>(MangledName,
146-
GenericParams,
147-
Parent);
145+
return A.template makeTypeRef<BoundGenericTypeRef>(MangledName,
146+
GenericParams,
147+
Parent);
148148
}
149149

150150
const std::vector<const TypeRef *> &getGenericParams() const {
@@ -168,7 +168,7 @@ class TupleTypeRef final : public TypeRef {
168168
static TupleTypeRef *create(Allocator &A,
169169
std::vector<const TypeRef *> Elements,
170170
bool Variadic = false) {
171-
return A.template make_typeref<TupleTypeRef>(Elements, Variadic);
171+
return A.template makeTypeRef<TupleTypeRef>(Elements, Variadic);
172172
}
173173

174174
const std::vector<const TypeRef *> &getElements() const {
@@ -196,7 +196,7 @@ class FunctionTypeRef final : public TypeRef {
196196
static FunctionTypeRef *create(Allocator &A,
197197
std::vector<const TypeRef *> Arguments,
198198
const TypeRef *Result) {
199-
return A.template make_typeref<FunctionTypeRef>(Arguments, Result);
199+
return A.template makeTypeRef<FunctionTypeRef>(Arguments, Result);
200200
}
201201

202202
const std::vector<const TypeRef *> &getArguments() const {
@@ -225,7 +225,7 @@ class ProtocolTypeRef final : public TypeRef {
225225
static const ProtocolTypeRef *
226226
create(Allocator &A, const std::string &ModuleName,
227227
const std::string &Name) {
228-
return A.template make_typeref<ProtocolTypeRef>(ModuleName, Name);
228+
return A.template makeTypeRef<ProtocolTypeRef>(ModuleName, Name);
229229
}
230230

231231
const std::string &getName() const {
@@ -259,7 +259,7 @@ class ProtocolCompositionTypeRef final : public TypeRef {
259259
template <typename Allocator>
260260
static const ProtocolCompositionTypeRef *
261261
create(Allocator &A, std::vector<const TypeRef *> Protocols) {
262-
return A.template make_typeref<ProtocolCompositionTypeRef>(Protocols);
262+
return A.template makeTypeRef<ProtocolCompositionTypeRef>(Protocols);
263263
}
264264

265265
const std::vector<const TypeRef *> &getProtocols() const {
@@ -281,7 +281,7 @@ class MetatypeTypeRef final : public TypeRef {
281281
template <typename Allocator>
282282
static const MetatypeTypeRef *create(Allocator &A,
283283
const TypeRef *InstanceType) {
284-
return A.template make_typeref<MetatypeTypeRef>(InstanceType);
284+
return A.template makeTypeRef<MetatypeTypeRef>(InstanceType);
285285
}
286286

287287
const TypeRef *getInstanceType() const {
@@ -303,7 +303,7 @@ class ExistentialMetatypeTypeRef final : public TypeRef {
303303
template <typename Allocator>
304304
static const ExistentialMetatypeTypeRef *
305305
create(Allocator &A, const TypeRef *InstanceType) {
306-
return A.template make_typeref<ExistentialMetatypeTypeRef>(InstanceType);
306+
return A.template makeTypeRef<ExistentialMetatypeTypeRef>(InstanceType);
307307
}
308308

309309
const TypeRef *getInstanceType() const {
@@ -326,7 +326,7 @@ class GenericTypeParameterTypeRef final : public TypeRef {
326326
template <typename Allocator>
327327
static const GenericTypeParameterTypeRef *
328328
create(Allocator &A, uint32_t Depth, uint32_t Index) {
329-
return A.template make_typeref<GenericTypeParameterTypeRef>(Depth, Index);
329+
return A.template makeTypeRef<GenericTypeParameterTypeRef>(Depth, Index);
330330
}
331331

332332
uint32_t getDepth() const {
@@ -357,8 +357,8 @@ class DependentMemberTypeRef final : public TypeRef {
357357
static const DependentMemberTypeRef *
358358
create(Allocator &A, const std::string &Member,
359359
const TypeRef *Base, const TypeRef *Protocol) {
360-
return A.template make_typeref<DependentMemberTypeRef>(Member, Base,
361-
Protocol);
360+
return A.template makeTypeRef<DependentMemberTypeRef>(Member, Base,
361+
Protocol);
362362
}
363363

364364
const std::string &getMember() const {
@@ -391,7 +391,7 @@ class ForeignClassTypeRef final : public TypeRef {
391391
template <typename Allocator>
392392
static ForeignClassTypeRef *create(Allocator &A,
393393
const std::string &Name) {
394-
return A.template make_typeref<ForeignClassTypeRef>(Name);
394+
return A.template makeTypeRef<ForeignClassTypeRef>(Name);
395395
}
396396

397397
const std::string &getName() const {
@@ -414,7 +414,7 @@ class ObjCClassTypeRef final : public TypeRef {
414414

415415
template <typename Allocator>
416416
static const ObjCClassTypeRef *create(Allocator &A, const std::string &Name) {
417-
return A.template make_typeref<ObjCClassTypeRef>(Name);
417+
return A.template makeTypeRef<ObjCClassTypeRef>(Name);
418418
}
419419

420420
const std::string &getName() const {
@@ -459,7 +459,7 @@ class UnownedStorageTypeRef final : public ReferenceStorageTypeRef {
459459
template <typename Allocator>
460460
static const UnownedStorageTypeRef *create(Allocator &A,
461461
const TypeRef *Type) {
462-
return A.template make_typeref<UnownedStorageTypeRef>(Type);
462+
return A.template makeTypeRef<UnownedStorageTypeRef>(Type);
463463
}
464464

465465
static bool classof(const TypeRef *TR) {
@@ -475,7 +475,7 @@ class WeakStorageTypeRef final : public ReferenceStorageTypeRef {
475475
template <typename Allocator>
476476
static const WeakStorageTypeRef *create(Allocator &A,
477477
const TypeRef *Type) {
478-
return A.template make_typeref<WeakStorageTypeRef>(Type);
478+
return A.template makeTypeRef<WeakStorageTypeRef>(Type);
479479
}
480480

481481
static bool classof(const TypeRef *TR) {
@@ -491,7 +491,7 @@ class UnmanagedStorageTypeRef final : public ReferenceStorageTypeRef {
491491
template <typename Allocator>
492492
static const UnmanagedStorageTypeRef *create(Allocator &A,
493493
const TypeRef *Type) {
494-
return A.template make_typeref<UnmanagedStorageTypeRef>(Type);
494+
return A.template makeTypeRef<UnmanagedStorageTypeRef>(Type);
495495
}
496496

497497
static bool classof(const TypeRef *TR) {

include/swift/Reflection/TypeRefBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class TypeRefBuilder {
101101

102102
public:
103103
template <typename TypeRefTy, typename... Args>
104-
TypeRefTy *make_typeref(Args... args) {
104+
TypeRefTy *makeTypeRef(Args... args) {
105105
auto TR = new TypeRefTy(::std::forward<Args>(args)...);
106106
TypeRefPool.push_back(std::unique_ptr<const TypeRef>(TR));
107107
return TR;

0 commit comments

Comments
 (0)