OSDN Git Service

print getresult operand and its type directly.
authorDevang Patel <dpatel@apple.com>
Sat, 23 Feb 2008 01:04:26 +0000 (01:04 +0000)
committerDevang Patel <dpatel@apple.com>
Sat, 23 Feb 2008 01:04:26 +0000 (01:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47514 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index adbcd78..55d037d 100644 (file)
@@ -1292,17 +1292,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
       writeOperand(I.getOperand(op+1), false); Out << " ]";
     }
   } else if (const GetResultInst *GRI = dyn_cast<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);
+    writeOperand(I.getOperand(0), true);
     Out << ", " << GRI->getIndex();
   } else if (isa<ReturnInst>(I) && !Operand) {
     Out << " void";