summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2014-01-28 23:12:42 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2014-01-28 23:12:42 +0000
commit4396f5d9d2c215988f9368e94bfd5e1eb1cced58 (patch)
tree69cefbbe6b6011c4b0d2e19b6130854038ba24e3 /include
parentece65e3bf9c318c53b6ac0052e1b3762bd69524c (diff)
downloadllvm-4396f5d9d2c215988f9368e94bfd5e1eb1cced58.tar.gz
llvm-4396f5d9d2c215988f9368e94bfd5e1eb1cced58.tar.bz2
llvm-4396f5d9d2c215988f9368e94bfd5e1eb1cced58.tar.xz
Change MCStreamer EmitInstruction interface to take subtarget info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200345 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h6
-rw-r--r--include/llvm/MC/MCObjectStreamer.h2
-rw-r--r--include/llvm/MC/MCStreamer.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index 85f4130a2f..f83d96783c 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -42,6 +42,7 @@ namespace llvm {
class MCAsmInfo;
class MCCFIInstruction;
class MCContext;
+ class MCInst;
class MCInstrInfo;
class MCSection;
class MCStreamer;
@@ -149,6 +150,11 @@ namespace llvm {
/// getDataLayout - Return information about data layout.
const DataLayout &getDataLayout() const;
+ /// getSubtargetInfo - Return information about subtarget.
+ const MCSubtargetInfo &getSubtargetInfo() const;
+
+ void EmitToStreamer(MCStreamer &S, const MCInst &Inst);
+
/// getTargetTriple - Return the target triple string.
StringRef getTargetTriple() const;
diff --git a/include/llvm/MC/MCObjectStreamer.h b/include/llvm/MC/MCObjectStreamer.h
index f6a7e713c4..6ad7fa1923 100644
--- a/include/llvm/MC/MCObjectStreamer.h
+++ b/include/llvm/MC/MCObjectStreamer.h
@@ -83,7 +83,7 @@ public:
virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol);
virtual void ChangeSection(const MCSection *Section,
const MCExpr *Subsection);
- virtual void EmitInstruction(const MCInst &Inst);
+ virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo& STI);
/// \brief Emit an instruction to a special fragment, because this instruction
/// can change its size during relaxation.
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h
index 9a4bafe3cd..3eb5446f53 100644
--- a/include/llvm/MC/MCStreamer.h
+++ b/include/llvm/MC/MCStreamer.h
@@ -663,7 +663,7 @@ public:
/// EmitInstruction - Emit the given @p Instruction into the current
/// section.
- virtual void EmitInstruction(const MCInst &Inst) = 0;
+ virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) = 0;
/// \brief Set the bundle alignment mode from now on in the section.
/// The argument is the power of 2 to which the alignment is set. The