aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCObjectStreamer.cpp')
-rw-r--r--lib/MC/MCObjectStreamer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp
index 111bc1be06..a8ea1a423d 100644
--- a/lib/MC/MCObjectStreamer.cpp
+++ b/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();
}