summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Archive
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-23 00:39:35 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-23 00:39:35 +0000
commit8db844241b25c5a350d3edeeac459fca69c7ae51 (patch)
treef207ee659a6aa42169484ebf0fd20b313c5e8b54 /llvm/lib/Bytecode/Archive
parent3376c6d8c572d25b87670cd44e00e018a27b37b3 (diff)
downloadbcm5719-llvm-8db844241b25c5a350d3edeeac459fca69c7ae51.tar.gz
bcm5719-llvm-8db844241b25c5a350d3edeeac459fca69c7ae51.zip
For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users to handle error messages via arguments and result codes. llvm-svn: 29840
Diffstat (limited to 'llvm/lib/Bytecode/Archive')
-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 c99d8510c51..c3fda5fe1a9 100644
--- a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp
+++ b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp
@@ -389,7 +389,8 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
// Create a temporary file to store the archive in
sys::Path TmpArchive = archPath;
- TmpArchive.createTemporaryFileOnDisk();
+ if (TmpArchive.createTemporaryFileOnDisk(error))
+ return false;
// Make sure the temporary gets removed if we crash
sys::RemoveFileOnSignal(TmpArchive);
@@ -452,7 +453,8 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
// Open another temporary file in order to avoid invalidating the
// mmapped data
sys::Path FinalFilePath = archPath;
- FinalFilePath.createTemporaryFileOnDisk();
+ if (FinalFilePath.createTemporaryFileOnDisk(error))
+ return false;
sys::RemoveFileOnSignal(FinalFilePath);
std::ofstream FinalFile(FinalFilePath.c_str(), io_mode);
OpenPOWER on IntegriCloud