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
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index d0c6409..b7e7106 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -126,15 +126,8 @@
 
   // 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 93eaac1..c8ffcd6 100644
--- a/lib/Archive/ArchiveReader.cpp
+++ b/lib/Archive/ArchiveReader.cpp
@@ -207,16 +207,10 @@
   // 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 @@
 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 @@
         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 @@
   // 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 d67937e..ee55201 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -179,11 +179,7 @@
   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 @@
 
   // 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()
diff --git a/lib/Linker/LinkItems.cpp b/lib/Linker/LinkItems.cpp
index e66fa5b..3cf1f6b 100644
--- a/lib/Linker/LinkItems.cpp
+++ b/lib/Linker/LinkItems.cpp
@@ -82,9 +82,7 @@
     case sys::Unknown_FileType:
       return warning("Supposed library '" + Lib + "' isn't a library.");
 
-    case sys::Bytecode_FileType:
     case sys::Bitcode_FileType:
-    case sys::CompressedBytecode_FileType:
       // LLVM ".so" file.
       if (LinkInFile(Pathname, is_native))
         return error("Cannot link file '" + Pathname.toString() + "'");
@@ -176,9 +174,7 @@
         return error("Cannot link archive '" + File.toString() + "'");
       break;
 
-    case sys::Bitcode_FileType:
-    case sys::Bytecode_FileType:
-    case sys::CompressedBytecode_FileType: {
+    case sys::Bitcode_FileType: {
       verbose("Linking bitcode file '" + File.toString() + "'");
       std::auto_ptr<Module> M(LoadObject(File));
       if (M.get() == 0)
diff --git a/lib/Linker/Linker.cpp b/lib/Linker/Linker.cpp
index 4604305..9f9a59d 100644
--- a/lib/Linker/Linker.cpp
+++ b/lib/Linker/Linker.cpp
@@ -142,8 +142,6 @@
   FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1]));
   if (FullPath.isDynamicLibrary())  // Native shared library?
     return FullPath;
-  if (FullPath.isBytecodeFile())    // .so file containing bytecode?
-    return FullPath;
   if (FullPath.isBitcodeFile())    // .so file containing bitcode?
     return FullPath;
 
diff --git a/lib/System/Path.cpp b/lib/System/Path.cpp
index fcdc5ff..caf5789 100644
--- a/lib/System/Path.cpp
+++ b/lib/System/Path.cpp
@@ -47,14 +47,6 @@
       if (magic[1] == 'C' && magic[2] == (char)0xC0 && magic[3] == (char)0xDE)
         return Bitcode_FileType;
       break;
-    case 'l':
-      if (magic[1] == 'l' && magic[2] == 'v') {
-        if (magic[3] == 'c')
-          return CompressedBytecode_FileType;
-        else if (magic[3] == 'm')
-          return Bytecode_FileType;
-      }
-      break;
     case '!':
       if (length >= 8)
         if (memcmp(magic,"!<arch>\n",8) == 0)
@@ -165,14 +157,6 @@
 }
 
 bool
-Path::isBytecodeFile() const {
-  std::string actualMagic;
-  if (!getMagicNumber(actualMagic, 4))
-    return false;
-  return actualMagic == "llvc" || actualMagic == "llvm";
-}
-
-bool
 Path::isBitcodeFile() const {
   std::string actualMagic;
   if (!getMagicNumber(actualMagic, 4))