diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-23 00:39:35 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-23 00:39:35 +0000 |
commit | e5c9cb5eb6bce502faaedea04014dab46f6540f4 (patch) | |
tree | 7e0155eeab8ecac7a202cff5d092c0f73c15cce8 /lib/Bytecode/Archive | |
parent | b590a75eb566be4257f23340d3037ea1447e997e (diff) | |
download | external_llvm-e5c9cb5eb6bce502faaedea04014dab46f6540f4.zip external_llvm-e5c9cb5eb6bce502faaedea04014dab46f6540f4.tar.gz external_llvm-e5c9cb5eb6bce502faaedea04014dab46f6540f4.tar.bz2 |
For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Archive')
-rw-r--r-- | lib/Bytecode/Archive/ArchiveWriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Bytecode/Archive/ArchiveWriter.cpp b/lib/Bytecode/Archive/ArchiveWriter.cpp index c99d851..c3fda5f 100644 --- a/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/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); |