mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Revert r98656, its breaking all over the place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98662 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -808,25 +808,11 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
||||
else if (isCStr7)
|
||||
AbbrevToUse = CString7Abbrev;
|
||||
} else if (isa<ConstantArray>(C) || isa<ConstantStruct>(V) ||
|
||||
isa<ConstantVector>(V)) {
|
||||
isa<ConstantUnion>(C) || isa<ConstantVector>(V)) {
|
||||
Code = bitc::CST_CODE_AGGREGATE;
|
||||
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:
|
||||
|
Reference in New Issue
Block a user