Skip to content

Commit

Permalink
Simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtoguchi committed Sep 12, 2024
1 parent 1700c40 commit 15d8d94
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,9 +1177,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
options::OPT_fsycl_device_obj_EQ)) {
StringRef ArgValue(DeviceObj->getValue());
SmallVector<StringRef, 2> DeviceObjValues = {"spirv", "llvmir"};
auto FoundArg =
std::find(DeviceObjValues.begin(), DeviceObjValues.end(), ArgValue);
if (FoundArg == DeviceObjValues.end())
if (llvm::find(DeviceObjValues, ArgValue) == DeviceObjValues.end())
Diag(clang::diag::warn_ignoring_value_using_default)
<< DeviceObj->getSpelling().split('=').first << ArgValue << "llvmir";
}
Expand Down

0 comments on commit 15d8d94

Please sign in to comment.