Remove a bunch of cruft that was used to be backwards compatible with the last
prerelease format for LLVM bytecode files.  Now we only are compatible with
LLVM 1.0+.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12643 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index 63d8b42..54c9181 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -353,8 +353,7 @@
   GlobalValue::LinkageTypes Linkage = GlobalValue::ExternalLinkage;
 
   unsigned LinkageType = read_vbr_uint(Buf, EndBuf);
-  if ((!hasExtendedLinkageSpecs && LinkageType > 3) ||
-      ( hasExtendedLinkageSpecs && LinkageType > 4))
+  if (LinkageType > 4)
     throw std::string("Invalid linkage type for Function.");
   switch (LinkageType) {
   case 0: Linkage = GlobalValue::ExternalLinkage; break;
@@ -553,21 +552,12 @@
   // Read global variables...
   unsigned VarType = read_vbr_uint(Buf, End);
   while (VarType != Type::VoidTyID) { // List is terminated by Void
-    unsigned SlotNo;
+    // VarType Fields: bit0 = isConstant, bit1 = hasInitializer, bit2,3,4 =
+    // Linkage, bit4+ = slot#
+    unsigned SlotNo = VarType >> 5;
+    unsigned LinkageID = (VarType >> 2) & 7;
     GlobalValue::LinkageTypes Linkage;
 
-    unsigned LinkageID;
-    if (hasExtendedLinkageSpecs) {
-      // VarType Fields: bit0 = isConstant, bit1 = hasInitializer,
-      // bit2,3,4 = Linkage, bit4+ = slot#
-      SlotNo = VarType >> 5;
-      LinkageID = (VarType >> 2) & 7;
-    } else {
-      // VarType Fields: bit0 = isConstant, bit1 = hasInitializer,
-      // bit2,3 = Linkage, bit4+ = slot#
-      SlotNo = VarType >> 4;
-      LinkageID = (VarType >> 2) & 3;
-    }
     switch (LinkageID) {
     default: assert(0 && "Unknown linkage type!");
     case 0: Linkage = GlobalValue::ExternalLinkage;  break;
@@ -655,20 +645,10 @@
   RevisionNum = Version >> 4;
 
   // Default values for the current bytecode version
-  hasExtendedLinkageSpecs = true;
-  hasOldStyleVarargs = false;
-  hasVarArgCallPadding = false;
   hasInconsistentModuleGlobalInfo = false;
   hasExplicitPrimitiveZeros = false;
 
   switch (RevisionNum) {
-  case 2:               // LLVM pre-1.0 release: will be deleted on the next rev
-    // Version #2 only supported 4 linkage types.  It didn't support weak
-    // linkage.
-    hasExtendedLinkageSpecs = false;
-    hasOldStyleVarargs = true;
-    hasVarArgCallPadding = true;
-    // FALL THROUGH
   case 0:               //  LLVM 1.0, 1.1 release version
     // Compared to rev #2, we added support for weak linkage, a more dense
     // encoding, and better varargs support.
@@ -789,7 +769,6 @@
 
   TheModule = new Module(ModuleID);
   try { 
-    usesOldStyleVarargs = false;
     ParseModule(Buf, EndBuf);
   } catch (std::string &Error) {
     freeState();       // Must destroy handles before deleting module!