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 | 546436c482d5af62b2f36f6cd80676f854c93757 (patch) | |
| tree | 87d43f1ae750256b48862566f7347d09e4668364 /llvm/lib/Bytecode/Archive/ArchiveWriter.cpp | |
| parent | cfa807ab31e8dbb673bfba518e26b80239b5396c (diff) | |
| download | bcm5719-llvm-546436c482d5af62b2f36f6cd80676f854c93757.tar.gz bcm5719-llvm-546436c482d5af62b2f36f6cd80676f854c93757.zip | |
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
Diffstat (limited to 'llvm/lib/Bytecode/Archive/ArchiveWriter.cpp')
| -rw-r--r-- | llvm/lib/Bytecode/Archive/ArchiveWriter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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. |

