[llvm-commits] CVS: llvm/include/llvm/System/Path.h

Reid Spencer reid at x10sys.com
Wed Dec 15 00:32:57 PST 2004



Changes in directory llvm/include/llvm/System:

Path.h updated: 1.17 -> 1.18
---
Log message:

Fix a file overwrite bug in llvm-ar introduced by changes to 
createTemporaryFile semantics where it doesn't create a fully unique name
if the basename doesn't exist. This functionality is now optionally
provided by the boolean reuse_current parameter to createTemporaryFile and
makeUnique. The default values differ because of the way these functions
are used in LLVM.


---
Diffs of the changes:  (+2 -2)

Index: llvm/include/llvm/System/Path.h
diff -u llvm/include/llvm/System/Path.h:1.17 llvm/include/llvm/System/Path.h:1.18
--- llvm/include/llvm/System/Path.h:1.17	Tue Dec 14 19:50:13 2004
+++ llvm/include/llvm/System/Path.h	Wed Dec 15 02:32:45 2004
@@ -494,7 +494,7 @@
       /// already unique. 
       /// @throws std::string if an unrecoverable error occurs.
       /// @brief Make the current path name unique in the file system.
-      void makeUnique();
+      void makeUnique( bool reuse_current = true );
 
       /// This method attempts to create a directory in the file system with the
       /// same name as the Path object. The \p create_parents parameter controls
@@ -529,7 +529,7 @@
       /// the newly generated temporary file name is unique in the file system.
       /// @throws std::string if there is an error
       /// @brief Create a unique temporary file
-      bool createTemporaryFile();
+      bool createTemporaryFile(bool reuse_current = false);
 
       /// This method attempts to destroy the directory named by the last in 
       /// the Path name.  If \p remove_contents is false, an attempt will be 






More information about the llvm-commits mailing list