[llvm-commits] [llvm] r123660 - /llvm/trunk/lib/Archive/ArchiveWriter.cpp

Michael J. Spencer bigcheesegs at gmail.com
Mon Jan 17 08:43:30 PST 2011


Author: mspencer
Date: Mon Jan 17 10:43:30 2011
New Revision: 123660

URL: http://llvm.org/viewvc/llvm-project?rev=123660&view=rev
Log:
Archive: Fix temp path names.

Modified:
    llvm/trunk/lib/Archive/ArchiveWriter.cpp

Modified: llvm/trunk/lib/Archive/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/ArchiveWriter.cpp?rev=123660&r1=123659&r2=123660&view=diff
==============================================================================
--- llvm/trunk/lib/Archive/ArchiveWriter.cpp (original)
+++ llvm/trunk/lib/Archive/ArchiveWriter.cpp Mon Jan 17 10:43:30 2011
@@ -364,8 +364,9 @@
   // Create a temporary file to store the archive in
   SmallString<128> TempArchivePath;
   int ArchFD;
-  if (error_code ec = sys::fs::unique_file("%%-%%-%%-%%" + archPath.str(),
-                                                 ArchFD, TempArchivePath)) {
+  if (error_code ec =
+      sys::fs::unique_file("%%-%%-%%-%%-" + sys::path::filename(archPath.str()),
+                           ArchFD, TempArchivePath)) {
     if (ErrMsg) *ErrMsg = ec.message();
     return true;
   }
@@ -421,8 +422,9 @@
 
     // Open another temporary file in order to avoid invalidating the
     // mmapped data
-    if (error_code ec = sys::fs::unique_file("%%-%%-%%-%%" + archPath.str(),
-                                      ArchFD, TempArchiveWithSymbolTablePath)) {
+    if (error_code ec =
+      sys::fs::unique_file("%%-%%-%%-%%-" + sys::path::filename(archPath.str()),
+                           ArchFD, TempArchiveWithSymbolTablePath)) {
       if (ErrMsg) *ErrMsg = ec.message();
       return true;
     }





More information about the llvm-commits mailing list