MCAsmStreamer

Two implementations of MCStreamer:

  • MCAsmStreamer is a straightforward impl that prints out a directive for each method. (e.g EmitValue -> .byte)
  • MCObjectStreamer implements a full assembler.

    // Inheritance relations
    
    MCStreamer (contain an instance of `MCTargetStreamer` as member `TargetStreamer`)
    -> MCAsmStreamer (final)
    -> MCObjectStreamer
    -> MCELFStreamer
       -> MipsELFStreamer
    -> MCWasmStreamer
    
    // MCTargetStreamer for directives.
    
    // llvm/include/llvm/MCStreamer.h
    MCTargetStreamer (contain an instance `MCStreamer` as member `Streamer`)
    -> ARMTargetStreamer // include/llvm/MCStreamer.h
    -> MipsTargetStreamer // lib/Target/Mips/MipsTargetStreamer.h
    -> MipsTargetAsmStreamer // lib/Target/Mips/MipsTargetStreamer.h
    -> MipsTargetELFStreamer // lib/Target/Mips/MipsTargetStreamer.h
    -> RISCVTargetStreamer // lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
    
Created Jul 20, 2020 // Last Updated Aug 16, 2020

If you could revise
the fundmental principles of
computer system design
to improve security...

... what would you change?