[clang] f2801a5 - [Clang][OpenMP] Check if value is contained in array, not if it's contained in the first element (#69462)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 20 09:51:28 PDT 2023
Author: Juan Manuel Martinez CaamaƱo
Date: 2023-10-20T18:51:22+02:00
New Revision: f2801a5f5d4d8d6da758a35487ee3ca6a48732c5
URL: https://github.com/llvm/llvm-project/commit/f2801a5f5d4d8d6da758a35487ee3ca6a48732c5
DIFF: https://github.com/llvm/llvm-project/commit/f2801a5f5d4d8d6da758a35487ee3ca6a48732c5.diff
LOG: [Clang][OpenMP] Check if value is contained in array, not if it's contained in the first element (#69462)
Added:
Modified:
clang/lib/Driver/ToolChains/CommonArgs.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index 25fd940584624ee..7b2966f70bf6fc6 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -2295,7 +2295,7 @@ void tools::AddStaticDeviceLibs(Compilation *C, const Tool *T,
static const StringRef HostOnlyArchives[] = {
"omp", "cudart", "m", "gcc", "gcc_s", "pthread", "hip_hcc"};
for (auto SDLName : DriverArgs.getAllArgValues(options::OPT_l)) {
- if (!HostOnlyArchives->contains(SDLName)) {
+ if (!llvm::is_contained(HostOnlyArchives, SDLName)) {
SDLNames.insert(std::string("-l") + SDLName);
}
}
More information about the cfe-commits
mailing list