summaryrefslogtreecommitdiff
path: root/lib/Archive
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-08-10 01:57:52 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-08-10 01:57:52 +0000
commit94bc246a8b2fd0ef371c8f3846ac9a5a367ed9ab (patch)
tree9fc1d907a6f064e545653f41895d353456a569ca /lib/Archive
parentec175ff2704e26d4ee9d2853ba284d82923b9d74 (diff)
downloadllvm-94bc246a8b2fd0ef371c8f3846ac9a5a367ed9ab.tar.gz
llvm-94bc246a8b2fd0ef371c8f3846ac9a5a367ed9ab.tar.bz2
llvm-94bc246a8b2fd0ef371c8f3846ac9a5a367ed9ab.tar.xz
Remove references to compression in llvm-ar. It has been a long time since we
switched from a bytecode+bzip2 to the current bitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive')
-rw-r--r--lib/Archive/ArchiveReader.cpp7
-rw-r--r--lib/Archive/ArchiveWriter.cpp7
2 files changed, 4 insertions, 10 deletions
diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp
index 68873e2768..5cfc8109be 100644
--- a/lib/Archive/ArchiveReader.cpp
+++ b/lib/Archive/ArchiveReader.cpp
@@ -82,14 +82,9 @@ Archive::parseMemberHeader(const char*& At, const char* End, std::string* error)
ArchiveMemberHeader* Hdr = (ArchiveMemberHeader*)At;
At += sizeof(ArchiveMemberHeader);
- // Extract the size and determine if the file is
- // compressed or not (negative length).
int flags = 0;
int MemberSize = atoi(Hdr->size);
- if (MemberSize < 0) {
- flags |= ArchiveMember::CompressedFlag;
- MemberSize = -MemberSize;
- }
+ assert(MemberSize >= 0);
// Check the size of the member for sanity
if (At + MemberSize > End) {
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index 9ef29432dd..ec6b4b8758 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -204,7 +204,6 @@ Archive::writeMember(
std::ofstream& ARFile,
bool CreateSymbolTable,
bool TruncateNames,
- bool ShouldCompress,
std::string* ErrMsg
) {
@@ -349,7 +348,7 @@ Archive::writeSymbolTable(std::ofstream& ARFile) {
// table, flattening the file names (no directories, 15 chars max) and
// compressing each archive member.
bool
-Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
+Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames,
std::string* ErrMsg)
{
// Make sure they haven't opened up the file, not loaded it,
@@ -394,7 +393,7 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
// builds the symbol table, symTab.
for (MembersList::iterator I = begin(), E = end(); I != E; ++I) {
if (writeMember(*I, ArchiveFile, CreateSymbolTable,
- TruncateNames, Compress, ErrMsg)) {
+ TruncateNames, ErrMsg)) {
TmpArchive.eraseFromDisk();
ArchiveFile.close();
return true;
@@ -446,7 +445,7 @@ 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) {
- if (writeMember(*foreignST, FinalFile, false, false, false, ErrMsg)) {
+ if (writeMember(*foreignST, FinalFile, false, false, ErrMsg)) {
FinalFile.close();
TmpArchive.eraseFromDisk();
return true;