From 8d8a7ffe580c622e7e43f1426bca64e517de0d06 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29067 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Archive/ArchiveWriter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/Archive/ArchiveWriter.cpp') diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp index 87816651d7..390fd12851 100644 --- a/lib/Archive/ArchiveWriter.cpp +++ b/lib/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