summaryrefslogtreecommitdiff
path: root/lib/Archive
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-08 03:08:58 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-08 03:08:58 +0000
commita229c5cce75209047db32c6039aa0b0fd481f049 (patch)
tree7e69ee21a80ed018e52af9071602c3db887b8326 /lib/Archive
parentedb9d6bc720bb2328bb49f4400bf8d6b3b04ef50 (diff)
downloadllvm-a229c5cce75209047db32c6039aa0b0fd481f049.tar.gz
llvm-a229c5cce75209047db32c6039aa0b0fd481f049.tar.bz2
llvm-a229c5cce75209047db32c6039aa0b0fd481f049.tar.xz
Final Changes For PR495:
This chagne just renames some sys::Path methods to ensure they are not misused. The Path documentation now divides methods into two dimensions: Path/Disk and accessor/mutator. Path accessors and mutators only operate on the Path object itself without making any disk accesses. Disk accessors and mutators will also access or modify the file system. Because of the potentially destructive nature of disk mutators, it was decided that all such methods should end in the work "Disk" to ensure the user recognizes that the change will occur on the file system. This patch makes that change. The method name changes are: makeReadable -> makeReadableOnDisk makeWriteable -> makeWriteableOnDisk makeExecutable -> makeExecutableOnDisk setStatusInfo -> setStatusInfoOnDisk createDirectory -> createDirectoryOnDisk createFile -> createFileOnDisk createTemporaryFile -> createTemporaryFileOnDisk destroy -> eraseFromDisk rename -> renamePathOnDisk These changes pass the Linux Deja Gnu tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive')
-rw-r--r--lib/Archive/ArchiveWriter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index 1318471530..3517dc7453 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -374,7 +374,7 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress){
// Create a temporary file to store the archive in
sys::Path TmpArchive = archPath;
- TmpArchive.createTemporaryFile();
+ TmpArchive.createTemporaryFileOnDisk();
// Make sure the temporary gets removed if we crash
sys::RemoveFileOnSignal(TmpArchive);
@@ -450,17 +450,17 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress){
// Close up shop
FinalFile.close();
arch.close();
- TmpArchive.destroy();
+ TmpArchive.eraseFromDisk();
} else {
// We don't have to insert the symbol table, so just renaming the temp
// file to the correct name will suffice.
- TmpArchive.rename(archPath);
+ TmpArchive.renamePathOnDisk(archPath);
}
} catch (...) {
// Make sure we clean up.
if (TmpArchive.exists())
- TmpArchive.destroy();
+ TmpArchive.eraseFromDisk();
throw;
}
}