@@ -51,20 +51,20 @@ struct AccessibleFunctionCacheEntry {
5151 const char *Name;
5252 size_t NameLength;
5353
54- const AccessibleFunctionRecord *Func ;
54+ const AccessibleFunctionRecord *R ;
5555
5656public:
5757 AccessibleFunctionCacheEntry (llvm::StringRef name,
58- const AccessibleFunctionRecord *func )
59- : Func(func ) {
58+ const AccessibleFunctionRecord *record )
59+ : R(record ) {
6060 char *Name = reinterpret_cast <char *>(malloc (name.size ()));
6161 memcpy (Name, name.data (), name.size ());
6262
6363 this ->Name = Name;
6464 this ->NameLength = name.size ();
6565 }
6666
67- const AccessibleFunctionRecord *getFunction () const { return Func ; }
67+ const AccessibleFunctionRecord *getRecord () const { return R ; }
6868
6969 bool matchesKey (llvm::StringRef name) {
7070 return name == llvm::StringRef{Name, NameLength};
@@ -139,21 +139,21 @@ swift::runtime::swift_findAccessibleFunction(const char *targetNameStart,
139139 {
140140 auto snapshot = S.Cache .snapshot ();
141141 if (auto E = snapshot.find (name))
142- return E->getFunction ();
142+ return E->getRecord ();
143143 }
144144
145145 // If entry doesn't exist (either record doesn't exist, hasn't been loaded, or
146146 // requested yet), let's try to find it and add to the cache.
147147
148- auto *function = _searchForFunctionRecord (S, name);
149- if (function ) {
148+ auto *record = _searchForFunctionRecord (S, name);
149+ if (record ) {
150150 S.Cache .getOrInsert (
151151 name, [&](AccessibleFunctionCacheEntry *entry, bool created) {
152152 if (created)
153- new (entry) AccessibleFunctionCacheEntry{name, function };
153+ new (entry) AccessibleFunctionCacheEntry{name, record };
154154 return true ;
155155 });
156156 }
157157
158- return function ;
158+ return record ;
159159}
0 commit comments