mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
add a "MCStreamer::EmitFill" method, and move the default implementation
(which just iteratively emits bytes) to MCStreamer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/MC/MCStreamer.h"
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@@ -16,3 +17,11 @@ MCStreamer::MCStreamer(MCContext &_Context) : Context(_Context), CurSection(0) {
|
||||
|
||||
MCStreamer::~MCStreamer() {
|
||||
}
|
||||
|
||||
/// EmitFill - Emit NumBytes bytes worth of the value specified by
|
||||
/// FillValue. This implements directives such as '.space'.
|
||||
void MCStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
|
||||
const MCExpr *E = MCConstantExpr::Create(FillValue, getContext());
|
||||
for (uint64_t i = 0, e = NumBytes; i != e; ++i)
|
||||
EmitValue(E, 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user