1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Print getresult instruction properly.

llvm-svn: 47473
This commit is contained in:
Devang Patel 2008-02-22 03:10:23 +00:00
parent 2754d59c53
commit 066973767f

View File

@ -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";