diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-07-07 20:56:50 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-07-07 20:56:50 +0000 |
commit | 8d8a7ffe580c622e7e43f1426bca64e517de0d06 (patch) | |
tree | c60daf1d048ab2afd3e3b491113c4e7697ee1f4a /lib/Bytecode/Archive/ArchiveWriter.cpp | |
parent | 3039b99697639479bf7ce1a447cb0b9a580a7606 (diff) |
Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29067 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Archive/ArchiveWriter.cpp')
-rw-r--r-- | lib/Bytecode/Archive/ArchiveWriter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Bytecode/Archive/ArchiveWriter.cpp b/lib/Bytecode/Archive/ArchiveWriter.cpp index 87816651d7..390fd12851 100644 --- a/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/lib/Bytecode/Archive/ArchiveWriter.cpp @@ -463,7 +463,12 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress, // compatibility with other ar(1) implementations as well as allowing the // archive to store both native .o and LLVM .bc files, both indexed. if (foreignST) { - writeMember(*foreignST, FinalFile, false, false, false); + if (!writeMember(*foreignST, FinalFile, false, false, false, error)) { + FinalFile.close(); + if (TmpArchive.exists()) + TmpArchive.eraseFromDisk(); + return false; + } } // Put out the LLVM symbol table now. |