aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2014-01-28 23:12:53 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2014-01-28 23:12:53 +0000
commitf5199f68f2e636b5bc2a9f976fd19cc89aad10ab (patch)
treeb958af1bf13785ef7bb0fb76a5437a619e095f2e /llvm/lib/MC/MCObjectStreamer.cpp
parent6f3c73f7df8aca0c2c05ae1dbdf8c50134459895 (diff)
downloadllvm-f5199f68f2e636b5bc2a9f976fd19cc89aad10ab.zip
llvm-f5199f68f2e636b5bc2a9f976fd19cc89aad10ab.tar.gz
llvm-f5199f68f2e636b5bc2a9f976fd19cc89aad10ab.tar.bz2
Keep the MCSubtargetInfo in the MCRelxableFragment class.
Needed to fix PR18303 to correctly re-encode the instruction if it is relaxed. We keep a copy of the MCSubtargetInfo to make sure that we are not effected by future changes to the subtarget info coming from the assembler (e.g. when parsing .code 16 directived). llvm-svn: 200347
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index d46f9d6..689c423 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -230,7 +230,7 @@ void MCObjectStreamer::EmitInstToFragment(const MCInst &Inst,
const MCSubtargetInfo &STI) {
// Always create a new, separate fragment here, because its size can change
// during relaxation.
- MCRelaxableFragment *IF = new MCRelaxableFragment(Inst);
+ MCRelaxableFragment *IF = new MCRelaxableFragment(Inst, STI);
insert(IF);
SmallString<128> Code;