Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
[Driver] Use StringSet::contains (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Oct 26, 2023
1 parent f09f58d commit f40ed13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2593,7 +2593,7 @@ void Driver::BuildInputs(const ToolChain &TC, DerivedArgList &Args,
// Warn -x after last input file has no effect
auto LastXArg = Args.getLastArgValue(options::OPT_x);
const llvm::StringSet<> ValidXArgs = {"cuda", "hip", "cui", "hipi"};
if (!IsCLMode() || ValidXArgs.find(LastXArg) != ValidXArgs.end()) {
if (!IsCLMode() || ValidXArgs.contains(LastXArg)) {
Arg *LastXArg = Args.getLastArgNoClaim(options::OPT_x);
Arg *LastInputArg = Args.getLastArgNoClaim(options::OPT_INPUT);
if (LastXArg && LastInputArg &&
Expand Down

0 comments on commit f40ed13

Please sign in to comment.