summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode
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
commit879ed5ab9c372c5bd42fab8dcdf78628aa479639 (patch)
treeb547dd5eb998653fa46593578ea5bf440305e6be /llvm/lib/Bytecode
parentbd156a901d4e06bfb18b8468607689f1bbec5aae (diff)
downloadbcm5719-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.cpp6
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;
}
OpenPOWER on IntegriCloud