================
@@ -1049,31 +1047,33 @@ static llvm::Error CopyFile(StringRef FilePath, 
StringRef OutDirectory) {
   std::error_code FileErr = llvm::sys::fs::copy_file(PathRead, PathWrite);
   if (FileErr != OK) {
     return llvm::createStringError(llvm::inconvertibleErrorCode(),
-                                   "error creating file " +
-                                       llvm::sys::path::filename(FilePath) +
-                                       ": " + FileErr.message() + "\n");
+                                   "error creating file " + FilePath + ": " +
+                                       FileErr.message() + "\n");
----------------
ilovepi wrote:

I'm a little unclear on why we're not using the `llvm::sys::path` here anymore? 
Is `FilePath` actually a `URL` or something equivalent that isn't platform 
dependent? For example, if it's a real file system path, I'd worry that things 
like the `/` would be wrong if this was Windows vs. Linux. 


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

Reply via email to