diff options
author | Chris Lattner <sabre@nondot.org> | 2012-01-25 01:27:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-01-25 01:27:20 +0000 |
commit | 9be59599b3b17be04d92a86b4bc11631e554a0d5 (patch) | |
tree | ad99cba3a715c18d491c21467b2be9a7677e52b3 /llvm/lib/CodeGen | |
parent | dd99ec8ccf542bfde5fe60eb23ad58e5bbf1b790 (diff) | |
download | bcm5719-llvm-9be59599b3b17be04d92a86b4bc11631e554a0d5.tar.gz bcm5719-llvm-9be59599b3b17be04d92a86b4bc11631e554a0d5.zip |
Use the right method to get the # elements in a CDS.
llvm-svn: 148897
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index ff6da1248bb..0e6c613f93b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1630,7 +1630,7 @@ static void EmitGlobalConstantDataSequential(const ConstantDataSequential *CDS, // Otherwise, emit the values in successive locations. unsigned ElementByteSize = CDS->getElementByteSize(); if (isa<IntegerType>(CDS->getElementType())) { - for (unsigned i = 0, e = CDS->getType()->getNumElements(); i != e; ++i) { + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) { AP.OutStreamer.EmitIntValue(CDS->getElementAsInteger(i), ElementByteSize, AddrSpace); } @@ -1643,7 +1643,7 @@ static void EmitGlobalConstantDataSequential(const ConstantDataSequential *CDS, CDS->getElementType()->isDoubleTy()); if (ElementByteSize == 4) { - for (unsigned i = 0, e = CDS->getType()->getNumElements(); i != e; ++i) { + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) { union { float F; uint32_t I; @@ -1657,7 +1657,7 @@ static void EmitGlobalConstantDataSequential(const ConstantDataSequential *CDS, return; } - for (unsigned i = 0, e = CDS->getType()->getNumElements(); i != e; ++i) { + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) { union { double F; uint64_t I; diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index cd9bec11bd0..7731f7c6b28 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -1059,7 +1059,7 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) { if (const ConstantDataSequential *CDS = dyn_cast<ConstantDataSequential>(C)) { SmallVector<SDValue, 4> Ops; - for (unsigned i = 0, e = CDS->getType()->getNumElements(); i != e; ++i) { + for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) { SDNode *Val = getValue(CDS->getElementAsConstant(i)).getNode(); // Add each leaf value from the operand to the Constants list // to form a flattened list of all the values. |