From 1503fc0fd018ad30e02bb8c880330a2e351e4e76 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Fri, 15 Jun 2018 09:48:18 +0000 Subject: [MC] Move bundling and MCSubtargetInfo to MCEncodedFragment [NFC] Instruction bundling is only supported on descendants of the MCEncodedFragment type. By moving the bundling functionality and MCSubtargetInfo to this class it makes it easier to set and extract the MCSubtargetInfo when it is necessary. This is a refactoring change that will make it easier to pass the MCSubtargetInfo through to writeNops when nop padding is required. Differential Revision: https://reviews.llvm.org/D45959 llvm-svn: 334814 --- llvm/lib/MC/MCELFStreamer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/MC/MCELFStreamer.cpp') diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp index df11495a954..f44d877e260 100644 --- a/llvm/lib/MC/MCELFStreamer.cpp +++ b/llvm/lib/MC/MCELFStreamer.cpp @@ -557,6 +557,7 @@ void MCELFStreamer::EmitInstToData(const MCInst &Inst, MCCompactEncodedInstFragment *CEIF = new MCCompactEncodedInstFragment(); insert(CEIF); CEIF->getContents().append(Code.begin(), Code.end()); + CEIF->setHasInstructions(STI); return; } else { DF = new MCDataFragment(); -- cgit v1.2.3