mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Use the right method to get the # elements in a CDS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148897 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user