summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-19 21:51:22 +0000
committerChris Lattner <sabre@nondot.org>2010-01-19 21:51:22 +0000
commitecaf0dcbc613c6575a0fe1395620b1295409540d (patch)
tree6ca37788b929d8585c75abb4bc82ec176cfc2f20 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parentf3b9b9583e38fe18937f465658ec76b32dd5a337 (diff)
downloadbcm5719-llvm-ecaf0dcbc613c6575a0fe1395620b1295409540d.tar.gz
bcm5719-llvm-ecaf0dcbc613c6575a0fe1395620b1295409540d.zip
eliminate AsmPrinter::EmitZeros: just use MCStreamer directly.
llvm-svn: 93918
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 03672411f4e..2e576b323a6 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1058,12 +1058,6 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
}
}
-/// EmitZeros - Emit a block of zeros.
-///
-void AsmPrinter::EmitZeros(uint64_t NumZeros, unsigned AddrSpace) const {
- OutStreamer.EmitFill(NumZeros, 0, AddrSpace);
-}
-
/// printAsCString - Print the specified array as a C compatible string, only if
/// the predicate isString is true.
///
@@ -1134,7 +1128,7 @@ static void EmitGlobalConstantStruct(const ConstantStruct *CS,
// Insert padding - this may include padding to increase the size of the
// current field up to the ABI size (if the struct is not packed) as well
// as padding to ensure that the next field starts at the right offset.
- AP.EmitZeros(padSize, AddrSpace);
+ AP.OutStreamer.EmitZeros(padSize, AddrSpace);
}
assert(SizeSoFar == cvsLayout->getSizeInBytes() &&
"Layout of constant struct may be incorrect!");
@@ -1283,9 +1277,8 @@ void AsmPrinter::EmitGlobalConstantFP(const ConstantFP *CFP,
}
O << '\n';
}
- LLVMContext &Context = CFP->getContext();
- EmitZeros(TD.getTypeAllocSize(Type::getX86_FP80Ty(Context)) -
- TD.getTypeStoreSize(Type::getX86_FP80Ty(Context)), AddrSpace);
+ OutStreamer.EmitZeros(TD.getTypeAllocSize(CFP->getType()) -
+ TD.getTypeStoreSize(CFP->getType()), AddrSpace);
return;
}
@@ -1412,7 +1405,7 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV, unsigned AddrSpace) {
unsigned Size = TD->getTypeAllocSize(type);
if (CV->isNullValue() || isa<UndefValue>(CV))
- return EmitZeros(Size, AddrSpace);
+ return OutStreamer.EmitZeros(Size, AddrSpace);
if (const ConstantArray *CVA = dyn_cast<ConstantArray>(CV))
return EmitGlobalConstantArray(CVA, AddrSpace, *this);
OpenPOWER on IntegriCloud