fix printing of function-local metadata to print all the operands of the
authorChris Lattner <sabre@nondot.org>
Thu, 31 Dec 2009 01:44:44 +0000 (01:44 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 31 Dec 2009 01:44:44 +0000 (01:44 +0000)
mdnode, not just operand 0 over and over.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index f9ca2cb01ee87986fda9f7d3797261eb9600fa7e..d2693c8ebd29d6324589769010213db15c2efcb7 100644 (file)
@@ -1208,9 +1208,9 @@ static void WriteAsOperandInternal(raw_ostream &Out, const Value *V,
         if (!Val)
           Out << "null";
         else {
-          TypePrinter->print(N->getOperand(0)->getType(), Out);
+          TypePrinter->print(N->getOperand(mi)->getType(), Out);
           Out << ' ';
-          WriteAsOperandInternal(Out, N->getOperand(0), TypePrinter, Machine);
+          WriteAsOperandInternal(Out, N->getOperand(mi), TypePrinter, Machine);
         }
         if (mi + 1 != me)
           Out << ", ";