summaryrefslogtreecommitdiff
path: root/lib/Archive
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2007-07-06 13:38:17 +0000
committerGabor Greif <ggreif@gmail.com>2007-07-06 13:38:17 +0000
commite75ca3d809ff17260efa320a949cb91ea2b3981e (patch)
tree88b6c59641db2229ecfe183eeaf3ace8c31708f9 /lib/Archive
parent664e9546d674096c5a012536f1a424b1681ece51 (diff)
eliminate residual cruft related to recognizing bytecode
files. bitcode files are the only LLVM format left. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive')
-rw-r--r--lib/Archive/Archive.cpp9
-rw-r--r--lib/Archive/ArchiveReader.cpp16
-rw-r--r--lib/Archive/ArchiveWriter.cpp9
3 files changed, 8 insertions, 26 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index d0c64097a2a..b7e7106ae6f 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -126,15 +126,8 @@ bool ArchiveMember::replaceWith(const sys::Path& newFile, std::string* ErrMsg) {
// Determine what kind of file it is
switch (sys::IdentifyFileType(signature,4)) {
- case sys::Bytecode_FileType:
- flags |= BytecodeFlag;
- break;
- case sys::CompressedBytecode_FileType:
- flags |= CompressedBytecodeFlag;
- flags &= ~CompressedFlag;
- break;
default:
- flags &= ~(BytecodeFlag|CompressedBytecodeFlag);
+ flags &= ~BitcodeFlag;
break;
}
return false;
diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp
index 93eaac18f6b..c8ffcd6863a 100644
--- a/lib/Archive/ArchiveReader.cpp
+++ b/lib/Archive/ArchiveReader.cpp
@@ -207,16 +207,10 @@ Archive::parseMemberHeader(const char*& At, const char* End, std::string* error)
// Determine if this is a bytecode file
switch (sys::IdentifyFileType(At, 4)) {
case sys::Bitcode_FileType:
- case sys::Bytecode_FileType:
- flags |= ArchiveMember::BytecodeFlag;
- break;
- case sys::CompressedBytecode_FileType:
- flags |= ArchiveMember::CompressedBytecodeFlag;
- flags &= ~ArchiveMember::CompressedFlag;
+ flags |= ArchiveMember::BitcodeFlag;
break;
default:
- flags &= ~(ArchiveMember::BytecodeFlag|
- ArchiveMember::CompressedBytecodeFlag);
+ flags &= ~ArchiveMember::BitcodeFlag;
break;
}
@@ -349,7 +343,7 @@ bool
Archive::getAllModules(std::vector<Module*>& Modules, std::string* ErrMessage) {
for (iterator I=begin(), E=end(); I != E; ++I) {
- if (I->isBytecode() || I->isCompressedBytecode()) {
+ if (I->isBitcode()) {
std::string FullMemberName = archPath.toString() +
"(" + I->getPath().toString() + ")";
MemoryBuffer *Buffer =
@@ -535,7 +529,7 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
return false;
// If it contains symbols
- if (mbr->isBytecode() || mbr->isCompressedBytecode()) {
+ if (mbr->isBitcode()) {
// Get the symbols
std::vector<std::string> symbols;
std::string FullMemberName = archPath.toString() + "(" +
@@ -612,7 +606,7 @@ bool Archive::isBitcodeArchive() {
// Scan the archive, trying to load a bitcode member. We only load one to
// see if this works.
for (iterator I = begin(), E = end(); I != E; ++I) {
- if (!I->isBytecode() && !I->isCompressedBytecode())
+ if (!I->isBitcode())
continue;
std::string FullMemberName =
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index d67937ea114..ee552013838 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -179,11 +179,7 @@ Archive::addFileBefore(const sys::Path& filePath, iterator where,
mbr->path.getMagicNumber(magic,4);
switch (sys::IdentifyFileType(magic.c_str(),4)) {
case sys::Bitcode_FileType:
- case sys::Bytecode_FileType:
- flags |= ArchiveMember::BytecodeFlag;
- break;
- case sys::CompressedBytecode_FileType:
- flags |= ArchiveMember::CompressedBytecodeFlag;
+ flags |= ArchiveMember::BitcodeFlag;
break;
default:
break;
@@ -223,8 +219,7 @@ Archive::writeMember(
// Now that we have the data in memory, update the
// symbol table if its a bitcode file.
- if (CreateSymbolTable &&
- (member.isBytecode() || member.isCompressedBytecode())) {
+ if (CreateSymbolTable && member.isBitcode()) {
std::vector<std::string> symbols;
std::string FullMemberName = archPath.toString() + "(" +
member.getPath().toString()