Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions lib/Target/CBackend/CBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ namespace {
void printContainedStructs(Type *Ty, SmallPtrSet<Type *, 16> &);
void printFloatingPointConstants(Function &F);
void printFloatingPointConstants(const Constant *C);
void
printFloatingPointConstantDataSequentials(const ConstantDataSequential *CDS);
void printFunctionSignature(const Function *F, bool Prototype);
bool okayToPrint(BasicBlock *BB);
void printFunction(Function &);
Expand Down Expand Up @@ -2184,8 +2186,13 @@ void CWriter::printFloatingPointConstants(Function &F) {
// precision.
//
for (constant_iterator I = constant_begin(&F), E = constant_end(&F);
I != E; ++I)
printFloatingPointConstants(*I);
I != E; ++I) {
if (const ConstantDataSequential *CDS = dyn_cast<ConstantDataSequential>(*I)) {
printFloatingPointConstantDataSequentials(CDS);
} else {
printFloatingPointConstants(*I);
}
}

Out << '\n';
}
Expand Down Expand Up @@ -2244,6 +2251,12 @@ void CWriter::printFloatingPointConstants(const Constant *C) {
}
}

void CWriter::printFloatingPointConstantDataSequentials(
const ConstantDataSequential *CDS) {
for (unsigned i = 0, e = CDS->getNumElements(); i != e; ++i) {
printFloatingPointConstants(CDS->getElementAsConstant(i));
}
}

/// printSymbolTable - Run through symbol table looking for type names. If a
/// type name is found, emit its declaration...
Expand Down