================
@@ -691,9 +696,12 @@ Error runNVLink(ArrayRef<StringRef> Files, const ArgList 
&Args) {
   if (Args.hasArg(OPT_lto_emit_asm) || Args.hasArg(OPT_lto_emit_llvm))
     return Error::success();
 
-  std::string CudaPath = Args.getLastArgValue(OPT_cuda_path_EQ).str();
-  Expected<std::string> NVLinkPath =
-      findProgram(Args, "nvlink", {CudaPath + "/bin"});
+  SmallVector<StringRef, 1> SearchPaths;
+  if (Arg *A = Args.getLastArg(OPT_cuda_path_EQ))
+    SearchPaths.push_back(
+        Args.MakeArgString(StringRef(A->getValue()) + "/bin"));
----------------
arsenm wrote:

I assume what's happening is StringRef implicit conversion to Twine, so you 
might as well directly go to Twine 

https://github.com/llvm/llvm-project/pull/152789
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to