use the right accessor for ConstantDataArray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149342 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2012-01-31 03:16:39 +00:00
parent 8b10b69ba2
commit 9a0b604d33

View 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);
}