diff options
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index 111bc1b..a8ea1a4 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -172,6 +172,13 @@ void MCObjectStreamer::EmitInstruction(const MCInst &Inst) {    EmitInstToFragment(Inst);  } +void MCObjectStreamer::EmitInstToFragment(const MCInst &Inst) { +  MCInstFragment *IF = new MCInstFragment(Inst, getCurrentSectionData()); + +  raw_svector_ostream VecOS(IF->getCode()); +  getAssembler().getEmitter().EncodeInstruction(Inst, VecOS, IF->getFixups()); +} +  void MCObjectStreamer::Finish() {    getAssembler().Finish();  }  | 
