summaryrefslogtreecommitdiff
path: root/lib/Archive
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-23 07:30:48 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-23 07:30:48 +0000
commit5a060775da43ec2ef37e839e93a0805d543708a9 (patch)
tree6cd7efaa67dec5d363323ccc5b9ee95c2e5bb8bd /lib/Archive
parent6f4c60770cfe6c485cdcb1397df59d2c7778cbc9 (diff)
downloadllvm-5a060775da43ec2ef37e839e93a0805d543708a9.tar.gz
llvm-5a060775da43ec2ef37e839e93a0805d543708a9.tar.bz2
llvm-5a060775da43ec2ef37e839e93a0805d543708a9.tar.xz
For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its users correspondingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive')
-rw-r--r--lib/Archive/ArchiveWriter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index c3fda5fe1a..86da17cc77 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -496,7 +496,8 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
arch.close();
// Move the final file over top of TmpArchive
- FinalFilePath.renamePathOnDisk(TmpArchive);
+ if (FinalFilePath.renamePathOnDisk(TmpArchive, error))
+ return false;
}
// Before we replace the actual archive, we need to forget all the
@@ -504,7 +505,8 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
// this because we cannot replace an open file on Windows.
cleanUpMemory();
- TmpArchive.renamePathOnDisk(archPath);
+ if (TmpArchive.renamePathOnDisk(archPath, error))
+ return false;
return true;
}