Skip to content

Commit f2801a5

Browse files
authored
[Clang][OpenMP] Check if value is contained in array, not if it's contained in the first element (llvm#69462)
1 parent bde2e69 commit f2801a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2295,7 +2295,7 @@ void tools::AddStaticDeviceLibs(Compilation *C, const Tool *T,
22952295
static const StringRef HostOnlyArchives[] = {
22962296
"omp", "cudart", "m", "gcc", "gcc_s", "pthread", "hip_hcc"};
22972297
for (auto SDLName : DriverArgs.getAllArgValues(options::OPT_l)) {
2298-
if (!HostOnlyArchives->contains(SDLName)) {
2298+
if (!llvm::is_contained(HostOnlyArchives, SDLName)) {
22992299
SDLNames.insert(std::string("-l") + SDLName);
23002300
}
23012301
}

0 commit comments

Comments
 (0)