Skip to content

Commit 14e4930

Browse files
committed
Minor cleanups to Config and Casting.
1 parent 0a123c7 commit 14e4930

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

include/swift/Runtime/Config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
// convention.
122122
#define SWIFT_LLVM_CC(CC) SWIFT_LLVM_CC_##CC
123123

124-
// Currently, RuntimeFunction.def uses the following calling conventions:
124+
// Currently, RuntimeFunctions.def uses the following calling conventions:
125125
// DefaultCC, RegisterPreservingCC, SwiftCC.
126126
// If new runtime calling conventions are added later, they need to be mapped
127127
// here to something appropriate.

stdlib/public/runtime/Casting.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ std::string swift::nameForMetadata(const Metadata *type,
115115

116116
TypeNamePair
117117
swift::swift_getTypeName(const Metadata *type, bool qualified) {
118-
using Pair = TypeNamePair;
119118
using Key = llvm::PointerIntPair<const Metadata *, 1, bool>;
120119

121120
static StaticReadWriteLock TypeNameCacheLock;
@@ -132,7 +131,7 @@ swift::swift_getTypeName(const Metadata *type, bool qualified) {
132131
auto found = cache.find(key);
133132
if (found != cache.end()) {
134133
auto result = found->second;
135-
return Pair{result.first, result.second};
134+
return TypeNamePair{result.first, result.second};
136135
}
137136
}
138137

@@ -145,7 +144,7 @@ swift::swift_getTypeName(const Metadata *type, bool qualified) {
145144
auto found = cache.find(key);
146145
if (found != cache.end()) {
147146
auto result = found->second;
148-
return Pair{result.first, result.second};
147+
return TypeNamePair{result.first, result.second};
149148
}
150149

151150
// Build the metadata name.
@@ -157,7 +156,7 @@ swift::swift_getTypeName(const Metadata *type, bool qualified) {
157156
result[size] = 0;
158157

159158
cache.insert({key, {result, size}});
160-
return Pair{result, size};
159+
return TypeNamePair{result, size};
161160
}
162161
}
163162

0 commit comments

Comments
 (0)