summaryrefslogtreecommitdiffstats
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-28 22:29:50 +0000
committerChris Lattner <sabre@nondot.org>2006-07-28 22:29:50 +0000
commit0c33231eff17edbdabdb186e1fae718cf94b58b2 (patch)
treeb7b5e08357f3a04f92267bbbc0ee9d8915a82900 /lib/Bytecode
parent65a392ebeae214ccb25f4d5ec856688e4e690e0d (diff)
downloadexternal_llvm-0c33231eff17edbdabdb186e1fae718cf94b58b2.zip
external_llvm-0c33231eff17edbdabdb186e1fae718cf94b58b2.tar.gz
external_llvm-0c33231eff17edbdabdb186e1fae718cf94b58b2.tar.bz2
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
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Archive/ArchiveWriter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Bytecode/Archive/ArchiveWriter.cpp b/lib/Bytecode/Archive/ArchiveWriter.cpp
index 52ba99e..dc7ef67 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)