diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-07-28 22:29:50 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-07-28 22:29:50 +0000 |
| commit | 3cec10996725038a9cdb483ebd2f57a9dc054509 (patch) | |
| tree | da139d1205b695adc8eb2ff6dc3f02b6113b6ed5 /llvm/lib/Bytecode/Archive | |
| parent | 2091cc86af1a468c3fadc17d41f2e072d431214a (diff) | |
| download | bcm5719-llvm-3cec10996725038a9cdb483ebd2f57a9dc054509.tar.gz bcm5719-llvm-3cec10996725038a9cdb483ebd2f57a9dc054509.zip | |
Modify Path::eraseFromDisk to not throw an exception.
llvm-svn: 29400
Diffstat (limited to 'llvm/lib/Bytecode/Archive')
| -rw-r--r-- | llvm/lib/Bytecode/Archive/ArchiveWriter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp index 52ba99e8054..dc7ef672055 100644 --- a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp @@ -396,7 +396,7 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress, std::ofstream ArchiveFile(TmpArchive.c_str(), io_mode); // Check for errors opening or creating archive file. - if ( !ArchiveFile.is_open() || ArchiveFile.bad() ) { + if (!ArchiveFile.is_open() || ArchiveFile.bad()) { if (TmpArchive.exists()) TmpArchive.eraseFromDisk(); if (error) @@ -415,10 +415,9 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress, // Loop over all member files, and write them out. Note that this also // builds the symbol table, symTab. - for ( MembersList::iterator I = begin(), E = end(); I != E; ++I) { - if (!writeMember(*I,ArchiveFile,CreateSymbolTable, - TruncateNames,Compress,error)) - { + for (MembersList::iterator I = begin(), E = end(); I != E; ++I) { + if (!writeMember(*I, ArchiveFile, CreateSymbolTable, + TruncateNames, Compress, error)) { if (TmpArchive.exists()) TmpArchive.eraseFromDisk(); ArchiveFile.close(); @@ -448,7 +447,7 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress, sys::RemoveFileOnSignal(FinalFilePath); std::ofstream FinalFile(FinalFilePath.c_str(), io_mode); - if ( !FinalFile.is_open() || FinalFile.bad() ) { + if (!FinalFile.is_open() || FinalFile.bad()) { if (TmpArchive.exists()) TmpArchive.eraseFromDisk(); if (error) |

