From 9a0b604d3382e01208a980eff63193f95324dc37 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 31 Jan 2012 03:16:39 +0000 Subject: [PATCH] use the right accessor for ConstantDataArray. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149342 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CBackend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 4b86ee4d316..8c83bc349a8 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -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); }