remove TYPE_CODE_FUNCTION_OLD type code. it is no longer in use and it was marked...
authorNuno Lopes <nunoplopes@sapo.pt>
Tue, 8 May 2012 16:16:20 +0000 (16:16 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Tue, 8 May 2012 16:16:20 +0000 (16:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156383 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Bitcode/LLVMBitCodes.h
lib/Bitcode/Reader/BitcodeReader.cpp

index a8c34cb82995c06a0252ed25016c4205ec81be30..56090ead8b9d9d1223f10a910c6c52e3a258b643 100644 (file)
@@ -90,9 +90,6 @@ namespace bitc {
     TYPE_CODE_OPAQUE   =  6,    // OPAQUE
     TYPE_CODE_INTEGER  =  7,    // INTEGER: [width]
     TYPE_CODE_POINTER  =  8,    // POINTER: [pointee type]
-
-    TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty,
-                                //            paramty x N]
     
     TYPE_CODE_HALF     =  10,   // HALF
     
index e3990403bd71ba394f22c34965a8743a5cb910fc..99542ec8becabef947118541b9fc03aea8f387a4 100644 (file)
@@ -620,26 +620,6 @@ bool BitcodeReader::ParseTypeTableBody() {
       ResultTy = PointerType::get(ResultTy, AddressSpace);
       break;
     }
-    case bitc::TYPE_CODE_FUNCTION_OLD: {
-      // FIXME: attrid is dead, remove it in LLVM 3.0
-      // FUNCTION: [vararg, attrid, retty, paramty x N]
-      if (Record.size() < 3)
-        return Error("Invalid FUNCTION type record");
-      SmallVector<Type*, 8> ArgTys;
-      for (unsigned i = 3, e = Record.size(); i != e; ++i) {
-        if (Type *T = getTypeByID(Record[i]))
-          ArgTys.push_back(T);
-        else
-          break;
-      }
-      
-      ResultTy = getTypeByID(Record[2]);
-      if (ResultTy == 0 || ArgTys.size() < Record.size()-3)
-        return Error("invalid type in function type");
-
-      ResultTy = FunctionType::get(ResultTy, ArgTys, Record[0]);
-      break;
-    }
     case bitc::TYPE_CODE_FUNCTION: {
       // FUNCTION: [vararg, retty, paramty x N]
       if (Record.size() < 2)