File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1125,16 +1125,12 @@ unsigned OMPClauseMappableExprCommon::getComponentsTotalNumber(
1125
1125
1126
1126
unsigned OMPClauseMappableExprCommon::getUniqueDeclarationsTotalNumber (
1127
1127
ArrayRef<const ValueDecl *> Declarations) {
1128
- unsigned TotalNum = 0u ;
1129
- llvm::SmallPtrSet<const ValueDecl *, 8 > Cache;
1128
+ llvm::SmallPtrSet<const ValueDecl *, 8 > UniqueDecls;
1130
1129
for (const ValueDecl *D : Declarations) {
1131
1130
const ValueDecl *VD = D ? cast<ValueDecl>(D->getCanonicalDecl ()) : nullptr ;
1132
- if (Cache.count (VD))
1133
- continue ;
1134
- ++TotalNum;
1135
- Cache.insert (VD);
1131
+ UniqueDecls.insert (VD);
1136
1132
}
1137
- return TotalNum ;
1133
+ return UniqueDecls. size () ;
1138
1134
}
1139
1135
1140
1136
OMPMapClause *OMPMapClause::Create (
You can’t perform that action at this time.
0 commit comments