Unverified Commit f2801a5f authored by Juan Manuel Martinez Caamaño's avatar Juan Manuel Martinez Caamaño Committed by GitHub
Browse files

[Clang][OpenMP] Check if value is contained in array, not if it's contained in...

[Clang][OpenMP] Check if value is contained in array, not if it's contained in the first element (#69462)
parent bde2e698
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
    }
  }