From 546436c482d5af62b2f36f6cd80676f854c93757 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 7 Jul 2006 20:56:50 +0000 Subject: 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. llvm-svn: 29067 --- llvm/lib/Bytecode/Archive/ArchiveWriter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Bytecode/Archive/ArchiveWriter.cpp') diff --git a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp b/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp index 87816651d73..390fd128512 100644 --- a/llvm/lib/Bytecode/Archive/ArchiveWriter.cpp +++ b/llvm/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. -- cgit v1.2.3