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(
11251125
11261126unsigned OMPClauseMappableExprCommon::getUniqueDeclarationsTotalNumber (
11271127 ArrayRef<const ValueDecl *> Declarations) {
1128- unsigned TotalNum = 0u ;
1129- llvm::SmallPtrSet<const ValueDecl *, 8 > Cache;
1128+ llvm::SmallPtrSet<const ValueDecl *, 8 > UniqueDecls;
11301129 for (const ValueDecl *D : Declarations) {
11311130 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);
11361132 }
1137- return TotalNum ;
1133+ return UniqueDecls. size () ;
11381134}
11391135
11401136OMPMapClause *OMPMapClause::Create (
You can’t perform that action at this time.
0 commit comments