mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-21 03:32:29 +00:00
add asmprinter suport for unions, fixing Feature/unions.ll to actually
be doing something useful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cbe1e31732
commit
94c484d3b8
@ -1027,6 +1027,15 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV,
|
||||
return;
|
||||
}
|
||||
|
||||
if (const ConstantUnion *CU = dyn_cast<ConstantUnion>(CV)) {
|
||||
Out << "{ ";
|
||||
TypePrinter.print(CU->getOperand(0)->getType(), Out);
|
||||
Out << ' ';
|
||||
WriteAsOperandInternal(Out, CU->getOperand(0), &TypePrinter, Machine);
|
||||
Out << " }";
|
||||
return;
|
||||
}
|
||||
|
||||
if (const ConstantVector *CP = dyn_cast<ConstantVector>(CV)) {
|
||||
const Type *ETy = CP->getType()->getElementType();
|
||||
assert(CP->getNumOperands() > 0 &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user