diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-23 07:30:48 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-23 07:30:48 +0000 |
commit | 879ed5ab9c372c5bd42fab8dcdf78628aa479639 (patch) | |
tree | b547dd5eb998653fa46593578ea5bf440305e6be /llvm/lib/Bytecode | |
parent | bd156a901d4e06bfb18b8468607689f1bbec5aae (diff) | |
download | bcm5719-llvm-879ed5ab9c372c5bd42fab8dcdf78628aa479639.tar.gz bcm5719-llvm-879ed5ab9c372c5bd42fab8dcdf78628aa479639.zip |
For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.
llvm-svn: 29843
Diffstat (limited to 'llvm/lib/Bytecode')
-rw-r--r-- | llvm/lib/Bytecode/Archive/ArchiveWriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp index c3fda5fe1a9..86da17cc77f 100644 --- a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/llvm/lib/Bytecode/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; } |