mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-18 09:27:27 +00:00
Print getresult instruction properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47473 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ec25f24dbf
commit
452743e5e4
@ -1291,6 +1291,19 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
writeOperand(I.getOperand(op ), false); Out << ',';
|
||||
writeOperand(I.getOperand(op+1), false); Out << " ]";
|
||||
}
|
||||
} else if (isa<GetResultInst>(I)) {
|
||||
const StructType *STy = cast<StructType>(I.getOperand(0)->getType());
|
||||
unsigned NumElems = STy->getNumElements();
|
||||
Out << " {";
|
||||
for (unsigned i = 0; i < NumElems; ++i) {
|
||||
if (i)
|
||||
Out << ",";
|
||||
Out << " ";
|
||||
printType(STy->getElementType(i));
|
||||
}
|
||||
Out << " }";
|
||||
writeOperand(I.getOperand(0), false);
|
||||
Out << ", " << cast<GetResultInst>(I).getIndex();
|
||||
} else if (isa<ReturnInst>(I)) {
|
||||
if (!Operand)
|
||||
Out << " void";
|
||||
|
Loading…
Reference in New Issue
Block a user