Support printing ConstantAggregateZeros.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke 2004-11-23 21:10:49 +00:00
parent 8a0c4fd0c6
commit 4dd043f090
2 changed files with 10 additions and 0 deletions

View File

@ -270,6 +270,11 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
unsigned size = TD.getTypeSize (CV->getType ());
O << "\t.skip\t " << size << "\n";
return;
} else if (isa<ConstantAggregateZero> (CV)) {
unsigned size = TD.getTypeSize (CV->getType ());
for (unsigned i = 0; i < size; ++i)
O << "\t.byte 0\n";
return;
}
const Type *type = CV->getType();

View File

@ -270,6 +270,11 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
unsigned size = TD.getTypeSize (CV->getType ());
O << "\t.skip\t " << size << "\n";
return;
} else if (isa<ConstantAggregateZero> (CV)) {
unsigned size = TD.getTypeSize (CV->getType ());
for (unsigned i = 0; i < size; ++i)
O << "\t.byte 0\n";
return;
}
const Type *type = CV->getType();