mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
ddf6bdde44
(which just iteratively emits bytes) to MCStreamer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93888 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
877 B
C++
28 lines
877 B
C++
//===- lib/MC/MCStreamer.cpp - Streaming Machine Code Output --------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/MC/MCStreamer.h"
|
|
#include "llvm/MC/MCExpr.h"
|
|
|
|
using namespace llvm;
|
|
|
|
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);
|
|
}
|