26 void MCLOHDirective::emit_impl(
raw_ostream &OutStream,
38 emit_impl(OutStream, ObjWriter, Layout);
46 void write_impl(
const char *,
size_t size)
override { Count += size; }
48 uint64_t current_pos()
const override {
return Count; }
51 raw_counting_ostream() : Count(0) {}
52 ~raw_counting_ostream()
override { flush(); }
55 raw_counting_ostream OutStream;
56 emit_impl(OutStream, ObjWriter, Layout);
57 return OutStream.tell();
raw_pwrite_stream & getStream()
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Encapsulates the layout of an assembly file at a particular point in time.
void emit(MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const
Emit this directive as: <kind, numArgs, addr1, ..., addrN>
uint64_t getEmitSize(const MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const
Get the size in bytes of this directive if emitted in ObjWriter with the given Layout.
This class implements an extremely fast bulk output stream that can only output to a stream...
void encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned Padding=0)
Utility function to encode a ULEB128 value to an output stream.
uint64_t getSymbolAddress(const MCSymbol &S, const MCAsmLayout &Layout) const