Remove EH use from the Archive library and adjust its users accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29066 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2006-07-07 19:09:14 +00:00
parent 215b48f9a8
commit 3039b99697
5 changed files with 262 additions and 219 deletions

View File

@ -438,12 +438,14 @@ class Archive {
/// name will be truncated at 15 characters. If \p Compress is specified,
/// all archive members will be compressed before being written. If
/// \p PrintSymTab is true, the symbol table will be printed to std::cout.
/// @throws std::string if an error occurs
/// @returns false if an error occurred, \p error set to error message
/// @returns true if the writing succeeded.
/// @brief Write (possibly modified) archive contents to disk
void writeToDisk(
bool writeToDisk(
bool CreateSymbolTable=false, ///< Create Symbol table
bool TruncateNames=false, ///< Truncate the filename to 15 chars
bool Compress=false ///< Compress files
bool Compress=false, ///< Compress files
std::string* error = 0 ///< If non-null, where error msg is set
);
/// This method adds a new file to the archive. The \p filename is examined
@ -481,9 +483,19 @@ class Archive {
/// @brief Write the symbol table to an ofstream.
void writeSymbolTable(std::ofstream& ARFile);
/// @brief Write one ArchiveMember to an ofstream.
void writeMember(const ArchiveMember& member, std::ofstream& ARFile,
bool CreateSymbolTable, bool TruncateNames, bool ShouldCompress);
/// Writes one ArchiveMember to an ofstream. If an error occurs, returns
/// false, otherwise true. If an error occurs and error is non-null then
/// it will be set to an error message.
/// @returns true Writing member succeeded
/// @returns false Writing member failed, \p error set to error message
bool writeMember(
const ArchiveMember& member, ///< The member to be written
std::ofstream& ARFile, ///< The file to write member onto
bool CreateSymbolTable, ///< Should symbol table be created?
bool TruncateNames, ///< Should names be truncated to 11 chars?
bool ShouldCompress, ///< Should the member be compressed?
std::string* error = 0 ///< If non-null, place were error msg is set
);
/// @brief Fill in an ArchiveMemberHeader from ArchiveMember.
bool fillHeader(const ArchiveMember&mbr,