forked from OSchip/llvm-project
.zero doesn't work in the Solaris assembler.
llvm-svn: 14231
This commit is contained in:
parent
4125c92009
commit
5b433a5de9
|
@ -206,10 +206,7 @@ void V8Printer::emitConstantValueOnly(const Constant *CV) {
|
||||||
void V8Printer::emitGlobalConstant(const Constant *CV) {
|
void V8Printer::emitGlobalConstant(const Constant *CV) {
|
||||||
const TargetData &TD = TM.getTargetData();
|
const TargetData &TD = TM.getTargetData();
|
||||||
|
|
||||||
if (CV->isNullValue()) {
|
if (const ConstantArray *CVA = dyn_cast<ConstantArray>(CV)) {
|
||||||
O << "\t.zero\t " << TD.getTypeSize(CV->getType()) << "\n";
|
|
||||||
return;
|
|
||||||
} else if (const ConstantArray *CVA = dyn_cast<ConstantArray>(CV)) {
|
|
||||||
if (CVA->isString()) {
|
if (CVA->isString()) {
|
||||||
O << "\t.ascii\t";
|
O << "\t.ascii\t";
|
||||||
printAsCString(O, CVA);
|
printAsCString(O, CVA);
|
||||||
|
@ -240,7 +237,7 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
|
||||||
|
|
||||||
// Insert the field padding unless it's zero bytes...
|
// Insert the field padding unless it's zero bytes...
|
||||||
if (padSize)
|
if (padSize)
|
||||||
O << "\t.zero\t " << padSize << "\n";
|
O << "\t.skip\t " << padSize << "\n";
|
||||||
}
|
}
|
||||||
assert(sizeSoFar == cvsLayout->StructSize &&
|
assert(sizeSoFar == cvsLayout->StructSize &&
|
||||||
"Layout of constant struct may be incorrect!");
|
"Layout of constant struct may be incorrect!");
|
||||||
|
|
Loading…
Reference in New Issue