summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-15 08:32:45 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-15 08:32:45 +0000
commit98ce23ffb0681e34c00feeaed54ba8e4fbe686a2 (patch)
tree4caa6db433afb2077958b406035b123df33050f4 /llvm/include
parent5b489416c9007f4dd09c06b0bc8c484125da6ff3 (diff)
downloadbcm5719-llvm-98ce23ffb0681e34c00feeaed54ba8e4fbe686a2.tar.gz
bcm5719-llvm-98ce23ffb0681e34c00feeaed54ba8e4fbe686a2.zip
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. llvm-svn: 18961
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/System/Path.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/System/Path.h b/llvm/include/llvm/System/Path.h
index 0e757f5c4e1..5be47b21bac 100644
--- a/llvm/include/llvm/System/Path.h
+++ b/llvm/include/llvm/System/Path.h
@@ -494,7 +494,7 @@ namespace sys {
/// 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 @@ namespace sys {
/// 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
OpenPOWER on IntegriCloud