@@ -59,11 +59,11 @@ template <typename ObjectType> struct PerThread {
5959public:
6060 ObjectType &get () { return getThreadEntry (); }
6161
62- template <class F > void clear (F f ) {
62+ template <class ClearFuncTy > void clear (ClearFuncTy ClearFunc ) {
6363 for (std::shared_ptr<PerThreadData> ThreadData : ThreadDataList) {
6464 if (!ThreadData->ThreadEntry )
6565 continue ;
66- f (*ThreadData->ThreadEntry );
66+ ClearFunc (*ThreadData->ThreadEntry );
6767 }
6868 ThreadDataList.clear ();
6969 }
@@ -175,19 +175,19 @@ template <typename ContainerType, typename ObjectType> struct PerThreadTable {
175175 return Entry.end ();
176176 }
177177
178- template <class F > void clear (F f ) {
178+ template <class ClearFuncTy > void clear (ClearFuncTy ClearFunc ) {
179179 for (std::shared_ptr<PerThreadData> ThreadData : ThreadDataList) {
180180 if (!ThreadData->ThreadEntry || ThreadData->NElements == 0 )
181181 continue ;
182182 if constexpr (has_clearAll<ContainerType>::value) {
183- ThreadData->ThreadEntry ->clearAll (f );
183+ ThreadData->ThreadEntry ->clearAll (ClearFunc );
184184 } else if constexpr (has_iterator<ContainerType>::value &&
185185 has_clear<ContainerType>::value) {
186186 for (auto &Obj : *ThreadData->ThreadEntry ) {
187187 if constexpr (is_associative<ContainerType>::value) {
188- f (Obj.second );
188+ ClearFunc (Obj.second );
189189 } else {
190- f (Obj);
190+ ClearFunc (Obj);
191191 }
192192 }
193193 ThreadData->ThreadEntry ->clear ();
@@ -199,16 +199,16 @@ template <typename ContainerType, typename ObjectType> struct PerThreadTable {
199199 ThreadDataList.clear ();
200200 }
201201
202- template <class F > llvm::Error deinit (F f ) {
202+ template <class DeinitFuncTy > llvm::Error deinit (DeinitFuncTy DeinitFunc ) {
203203 for (std::shared_ptr<PerThreadData> ThreadData : ThreadDataList) {
204204 if (!ThreadData->ThreadEntry || ThreadData->NElements == 0 )
205205 continue ;
206206 for (auto &Obj : *ThreadData->ThreadEntry ) {
207207 if constexpr (is_associative<ContainerType>::value) {
208- if (auto Err = f (Obj.second ))
208+ if (auto Err = DeinitFunc (Obj.second ))
209209 return Err;
210210 } else {
211- if (auto Err = f (Obj))
211+ if (auto Err = DeinitFunc (Obj))
212212 return Err;
213213 }
214214 }
0 commit comments