[llvm-commits] [llvm] r47473 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Devang Patel
dpatel at apple.com
Thu Feb 21 19:10:23 PST 2008
Author: dpatel
Date: Thu Feb 21 21:10:23 2008
New Revision: 47473
URL: http://llvm.org/viewvc/llvm-project?rev=47473&view=rev
Log:
Print getresult instruction properly.
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=47473&r1=47472&r2=47473&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Thu Feb 21 21:10:23 2008
@@ -1291,6 +1291,19 @@
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";
More information about the llvm-commits
mailing list