Generalize mcasmstreamer data emission APIs to take an address space
identifier. There is no way to work around it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93896 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 54a9309..0367241 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -436,7 +436,7 @@
// Emit inter-object padding for alignment.
unsigned AlignMask = CPE.getAlignment() - 1;
unsigned NewOffset = (Offset + AlignMask) & ~AlignMask;
- OutStreamer.EmitFill(NewOffset - Offset);
+ OutStreamer.EmitFill(NewOffset - Offset, 0/*fillval*/, 0/*addrspace*/);
const Type *Ty = CPE.getType();
Offset = NewOffset + TM.getTargetData()->getTypeAllocSize(Ty);
@@ -913,18 +913,6 @@
OutStreamer.EmitValueToAlignment(1 << NumBits, FillValue, 1, 0);
}
-/// EmitZeros - Emit a block of zeros.
-///
-void AsmPrinter::EmitZeros(uint64_t NumZeros, unsigned AddrSpace) const {
- if (NumZeros == 0) return;
- if (MAI->getZeroDirective() || AddrSpace == 0) {
- OutStreamer.EmitFill(NumZeros);
- } else {
- for (; NumZeros; --NumZeros)
- O << MAI->getData8bitsDirective(AddrSpace) << "0\n";
- }
-}
-
// Print out the specified constant, without a storage class. Only the
// constants valid in constant expressions can occur here.
void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
@@ -1070,6 +1058,12 @@
}
}
+/// 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.
///