mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
revert r156383: removal of TYPE_CODE_FUNCTION_OLD
Apparently LLVM only stopped emitting this after LLVM 3.0 llvm-svn: 157325
This commit is contained in:
parent
51776725b8
commit
68aaef6b21
@ -91,6 +91,9 @@ namespace bitc {
|
|||||||
TYPE_CODE_INTEGER = 7, // INTEGER: [width]
|
TYPE_CODE_INTEGER = 7, // INTEGER: [width]
|
||||||
TYPE_CODE_POINTER = 8, // POINTER: [pointee type]
|
TYPE_CODE_POINTER = 8, // POINTER: [pointee type]
|
||||||
|
|
||||||
|
TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty,
|
||||||
|
// paramty x N]
|
||||||
|
|
||||||
TYPE_CODE_HALF = 10, // HALF
|
TYPE_CODE_HALF = 10, // HALF
|
||||||
|
|
||||||
TYPE_CODE_ARRAY = 11, // ARRAY: [numelts, eltty]
|
TYPE_CODE_ARRAY = 11, // ARRAY: [numelts, eltty]
|
||||||
|
@ -594,6 +594,26 @@ bool BitcodeReader::ParseTypeTableBody() {
|
|||||||
ResultTy = PointerType::get(ResultTy, AddressSpace);
|
ResultTy = PointerType::get(ResultTy, AddressSpace);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case bitc::TYPE_CODE_FUNCTION_OLD: {
|
||||||
|
// FIXME: attrid is dead, remove it in LLVM 4.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: {
|
case bitc::TYPE_CODE_FUNCTION: {
|
||||||
// FUNCTION: [vararg, retty, paramty x N]
|
// FUNCTION: [vararg, retty, paramty x N]
|
||||||
if (Record.size() < 2)
|
if (Record.size() < 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user