File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1399,8 +1399,13 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
13991399 if (isDuplicateTargetTripleString (Target))
14001400 continue ;
14011401 Triples.insert (C.getInputArgs ().MakeArgString (TargetTripleString));
1402- } else
1402+ } else {
1403+ // Check for duplicate target triple strings for offloading
1404+ // models other than SYCL, before inserting in Triples.
1405+ if (isDuplicateTargetTripleString (Target))
1406+ continue ;
14031407 Triples.insert (C.getInputArgs ().MakeArgString (Target));
1408+ }
14041409 }
14051410
14061411 if (ArgValues.empty ())
@@ -1458,10 +1463,6 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
14581463 Diag (diag::err_drv_invalid_or_unsupported_offload_target) << TT.str ();
14591464 continue ;
14601465 }
1461- // Check for duplicate target triple strings.
1462- if ((Kind == Action::OFK_OpenMP || Kind == Action::OFK_SYCL) &&
1463- isDuplicateTargetTripleString (Target))
1464- continue ;
14651466
14661467 auto &TC = getOffloadToolChain (C.getInputArgs (), Kind, TT,
14671468 C.getDefaultToolChain ().getTriple ());
You can’t perform that action at this time.
0 commit comments