summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAsmStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCAsmStreamer.cpp40
1 files changed, 3 insertions, 37 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index 612e176e5af..c47ef73e718 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -31,7 +31,6 @@
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Path.h"
-#include "llvm/Support/SourceMgr.h"
#include <cctype>
using namespace llvm;
@@ -179,14 +178,6 @@ public:
void EmitFill(uint64_t NumBytes, uint8_t FillValue) override;
- void emitFill(const MCExpr &NumBytes, uint64_t FillValue,
- SMLoc Loc = SMLoc()) override;
-
- void emitFill(uint64_t NumValues, int64_t Size, int64_t Expr) override;
-
- void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,
- SMLoc Loc = SMLoc()) override;
-
void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
unsigned ValueSize = 1,
unsigned MaxBytesToEmit = 0) override;
@@ -808,41 +799,16 @@ void MCAsmStreamer::EmitGPRel32Value(const MCExpr *Value) {
void MCAsmStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
if (NumBytes == 0) return;
- const MCExpr *E = MCConstantExpr::create(NumBytes, getContext());
- emitFill(*E, FillValue);
-}
-
-void MCAsmStreamer::emitFill(const MCExpr &NumBytes, uint64_t FillValue,
- SMLoc Loc) {
if (const char *ZeroDirective = MAI->getZeroDirective()) {
- // FIXME: Emit location directives
- OS << ZeroDirective;
- NumBytes.print(OS, MAI);
+ OS << ZeroDirective << NumBytes;
if (FillValue != 0)
OS << ',' << (int)FillValue;
EmitEOL();
return;
}
- MCStreamer::emitFill(NumBytes, FillValue);
-}
-
-void MCAsmStreamer::emitFill(uint64_t NumValues, int64_t Size, int64_t Expr) {
- if (NumValues == 0)
- return;
-
- const MCExpr *E = MCConstantExpr::create(NumValues, getContext());
- emitFill(*E, Size, Expr);
-}
-
-void MCAsmStreamer::emitFill(const MCExpr &NumValues, int64_t Size,
- int64_t Expr, SMLoc Loc) {
- // FIXME: Emit location directives
- OS << "\t.fill\t";
- NumValues.print(OS, MAI);
- OS << ", " << Size << ", 0x";
- OS.write_hex(truncateToSize(Expr, 32));
- EmitEOL();
+ // Emit a byte at a time.
+ MCStreamer::EmitFill(NumBytes, FillValue);
}
void MCAsmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value,
OpenPOWER on IntegriCloud