File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -5023,24 +5023,23 @@ bool SYCLIntegrationFooter::emit(raw_ostream &OS) {
5023
5023
Policy.SuppressTypedefs = true ;
5024
5024
Policy.SuppressUnwrittenScope = true ;
5025
5025
5026
- llvm::SmallVector <const VarDecl *> VisitedSpecConstants;
5026
+ llvm::SmallSet <const VarDecl *, 8 > VisitedSpecConstants;
5027
5027
5028
5028
// Used to uniquely name the 'shim's as we generate the names in each
5029
5029
// anonymous namespace.
5030
5030
unsigned ShimCounter = 0 ;
5031
5031
for (const VarDecl *VD : SpecConstants) {
5032
5032
VD = VD->getCanonicalDecl ();
5033
5033
5034
- // Skip if we've already visited this.
5035
- if (llvm::find (VisitedSpecConstants, VD) != VisitedSpecConstants.end ())
5036
- continue ;
5037
-
5038
5034
// Skip if this isn't a SpecIdType. This can happen if it was a deduced
5039
5035
// type.
5040
5036
if (!Util::isSyclSpecIdType (VD->getType ().getCanonicalType ()))
5041
5037
continue ;
5042
5038
5043
- // TODO: skip if visited.
5039
+ // Skip if we've already visited this.
5040
+ if (llvm::find (VisitedSpecConstants, VD) != VisitedSpecConstants.end ())
5041
+ continue ;
5042
+
5044
5043
VisitedSpecConstants.push_back (VD);
5045
5044
std::string TopShim = EmitSpecIdShims (OS, ShimCounter, VD);
5046
5045
OS << " __SYCL_INLINE_NAMESPACE(cl) {\n " ;
You can’t perform that action at this time.
0 commit comments