@@ -51,20 +51,20 @@ struct AccessibleFunctionCacheEntry {
51
51
const char *Name;
52
52
size_t NameLength;
53
53
54
- const AccessibleFunctionRecord *Func ;
54
+ const AccessibleFunctionRecord *R ;
55
55
56
56
public:
57
57
AccessibleFunctionCacheEntry (llvm::StringRef name,
58
- const AccessibleFunctionRecord *func )
59
- : Func(func ) {
58
+ const AccessibleFunctionRecord *record )
59
+ : R(record ) {
60
60
char *Name = reinterpret_cast <char *>(malloc (name.size ()));
61
61
memcpy (Name, name.data (), name.size ());
62
62
63
63
this ->Name = Name;
64
64
this ->NameLength = name.size ();
65
65
}
66
66
67
- const AccessibleFunctionRecord *getFunction () const { return Func ; }
67
+ const AccessibleFunctionRecord *getRecord () const { return R ; }
68
68
69
69
bool matchesKey (llvm::StringRef name) {
70
70
return name == llvm::StringRef{Name, NameLength};
@@ -139,21 +139,21 @@ swift::runtime::swift_findAccessibleFunction(const char *targetNameStart,
139
139
{
140
140
auto snapshot = S.Cache .snapshot ();
141
141
if (auto E = snapshot.find (name))
142
- return E->getFunction ();
142
+ return E->getRecord ();
143
143
}
144
144
145
145
// If entry doesn't exist (either record doesn't exist, hasn't been loaded, or
146
146
// requested yet), let's try to find it and add to the cache.
147
147
148
- auto *function = _searchForFunctionRecord (S, name);
149
- if (function ) {
148
+ auto *record = _searchForFunctionRecord (S, name);
149
+ if (record ) {
150
150
S.Cache .getOrInsert (
151
151
name, [&](AccessibleFunctionCacheEntry *entry, bool created) {
152
152
if (created)
153
- new (entry) AccessibleFunctionCacheEntry{name, function };
153
+ new (entry) AccessibleFunctionCacheEntry{name, record };
154
154
return true ;
155
155
});
156
156
}
157
157
158
- return function ;
158
+ return record ;
159
159
}
0 commit comments