aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 390e482..07727f3 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -181,14 +181,6 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
Log2_32_Ceil(VE.getTypes().size()+1)));
unsigned StructAbbrev = Stream.EmitAbbrev(Abbv);
- // Abbrev for TYPE_CODE_UNION.
- Abbv = new BitCodeAbbrev();
- Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_UNION));
- Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
- Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
- Log2_32_Ceil(VE.getTypes().size()+1)));
- unsigned UnionAbbrev = Stream.EmitAbbrev(Abbv);
-
// Abbrev for TYPE_CODE_ARRAY.
Abbv = new BitCodeAbbrev();
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_ARRAY));
@@ -258,17 +250,6 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
AbbrevToUse = StructAbbrev;
break;
}
- case Type::UnionTyID: {
- const UnionType *UT = cast<UnionType>(T);
- // UNION: [eltty x N]
- Code = bitc::TYPE_CODE_UNION;
- // Output all of the element types.
- for (UnionType::element_iterator I = UT->element_begin(),
- E = UT->element_end(); I != E; ++I)
- TypeVals.push_back(VE.getTypeID(*I));
- AbbrevToUse = UnionAbbrev;
- break;
- }
case Type::ArrayTyID: {
const ArrayType *AT = cast<ArrayType>(T);
// ARRAY: [numelts, eltty]
@@ -811,20 +792,6 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i)
Record.push_back(VE.getValueID(C->getOperand(i)));
AbbrevToUse = AggregateAbbrev;
- } else if (isa<ConstantUnion>(C)) {
- Code = bitc::CST_CODE_AGGREGATE;
-
- // Unions only have one entry but we must send type along with it.
- const Type *EntryKind = C->getOperand(0)->getType();
-
- const UnionType *UnTy = cast<UnionType>(C->getType());
- int UnionIndex = UnTy->getElementTypeIndex(EntryKind);
- assert(UnionIndex != -1 && "Constant union contains invalid entry");
-
- Record.push_back(UnionIndex);
- Record.push_back(VE.getValueID(C->getOperand(0)));
-
- AbbrevToUse = AggregateAbbrev;
} else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
switch (CE->getOpcode()) {
default: