Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
Arg *SYCLTargetsValues = SYCLTargets ? SYCLTargets : SYCLLinkTargets;
if (SYCLTargetsValues) {
if (SYCLTargetsValues->getNumValues()) {
for (const char *Val : SYCLTargetsValues->getValues()) {
for (StringRef Val : SYCLTargetsValues->getValues()) {
llvm::Triple TT(Val);
if (!isValidSYCLTriple(TT)) {
Diag(clang::diag::err_drv_invalid_sycl_target) << Val;
Expand All @@ -821,7 +821,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,

// Store the current triple so that we can check for duplicates in
// the following iterations.
FoundNormalizedTriples[NormalizedName] = NormalizedName;
FoundNormalizedTriples[NormalizedName] = Val;
UniqueSYCLTriplesVec.push_back(TT);
}
} else
Expand Down Expand Up @@ -857,7 +857,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,

// Store the current triple so that we can check for duplicates in
// the following iterations.
FoundNormalizedTriples[NormalizedName] = NormalizedName;
FoundNormalizedTriples[NormalizedName] = Val;
UniqueSYCLTriplesVec.push_back(TT);
} else {
// No colon found, do not use the input
Expand Down