From 0c33231eff17edbdabdb186e1fae718cf94b58b2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 28 Jul 2006 22:29:50 +0000 Subject: Modify Path::eraseFromDisk to not throw an exception. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29400 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Archive/ArchiveWriter.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/Bytecode') diff --git a/lib/Bytecode/Archive/ArchiveWriter.cpp b/lib/Bytecode/Archive/ArchiveWriter.cpp index 52ba99e805..dc7ef67205 100644 --- a/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/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) -- cgit v1.2.3-70-g09d2