llvm::createAsmStreamer

Create a machine code streamer which will print out assembly for the native target, suitable for compiling with a native assembler.

Synopsis

Declared in <llvm/MC/TargetRegistry.h>

MCStreamer*
createAsmStreamer(
    MCContext& Ctx,
    std::unique_ptr<formatted_raw_ostream> OS,
    std::unique_ptr<MCInstPrinter> InstPrint,
    std::unique_ptr<MCCodeEmitter> CE,
    std::unique_ptr<MCAsmBackend> TAB);

Return Value

A new assembly MCStreamer.

Parameters

NameDescription
CtxThe machine code context.
OSThe formatted output stream. Takes ownership.
InstPrint- If given, the instruction printer to use. If not given the MCInst representation will be printed. This method takes ownership of InstPrint.
CE- If given, a code emitter to use to show the instruction encoding inline with the assembly. This method takes ownership of CE.
TAB- If given, a target asm backend to use to show the fixup information in conjunction with encoding information. This method takes ownership of TAB.