summaryrefslogtreecommitdiff
path: root/lib/Archive/ArchiveWriter.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-07-07 20:56:50 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-07-07 20:56:50 +0000
commit8d8a7ffe580c622e7e43f1426bca64e517de0d06 (patch)
treec60daf1d048ab2afd3e3b491113c4e7697ee1f4a /lib/Archive/ArchiveWriter.cpp
parent3039b99697639479bf7ce1a447cb0b9a580a7606 (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/Archive/ArchiveWriter.cpp')
-rw-r--r--lib/Archive/ArchiveWriter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index 87816651d73..390fd128512 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.