use the right accessor for ConstantDataArray.
authorChris Lattner <sabre@nondot.org>
Tue, 31 Jan 2012 03:16:39 +0000 (03:16 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 31 Jan 2012 03:16:39 +0000 (03:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149342 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp

index 4b86ee4d3165acaecc3273ff208ff8c786e67ea8..8c83bc349a8e7d61ce901cf8073832986fd08779 100644 (file)
@@ -680,7 +680,7 @@ void CWriter::printConstantDataSequential(ConstantDataSequential *CDS,
   } else {
     Out << "{ ";
     printConstant(CDS->getElementAsConstant(0), Static);
-    for (unsigned i = 1, e = CDS->getNumOperands(); i != e; ++i) {
+    for (unsigned i = 1, e = CDS->getNumElements(); i != e; ++i) {
       Out << ", ";
       printConstant(CDS->getElementAsConstant(i), Static);
     }