Packed types, brought to you by Brad Jones

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15938 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke
2004-08-20 06:00:58 +00:00
parent 4e5b9e136f
commit 715c90ba52
15 changed files with 460 additions and 17 deletions
+21
View File
@@ -243,6 +243,16 @@ void BytecodeWriter::outputType(const Type *T) {
break;
}
case Type::PackedTyID: {
const PackedType *PT = cast<PackedType>(T);
int Slot = Table.getSlot(PT->getElementType());
assert(Slot != -1 && "Type used but not available!!");
output_typeid((unsigned)Slot);
output_vbr(PT->getNumElements());
break;
}
case Type::StructTyID: {
const StructType *ST = cast<StructType>(T);
@@ -339,6 +349,17 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
break;
}
case Type::PackedTyID: {
const ConstantPacked *CP = cast<ConstantPacked>(CPV);
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) {
int Slot = Table.getSlot(CP->getOperand(i));
assert(Slot != -1 && "Constant used but not available!!");
output_vbr((unsigned)Slot);
}
break;
}
case Type::StructTyID: {
const ConstantStruct *CPS = cast<ConstantStruct>(CPV);