From 4396f5d9d2c215988f9368e94bfd5e1eb1cced58 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 28 Jan 2014 23:12:42 +0000 Subject: 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 --- include/llvm/CodeGen/AsmPrinter.h | 6 ++++++ include/llvm/MC/MCObjectStreamer.h | 2 +- include/llvm/MC/MCStreamer.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'include') 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 -- cgit v1.2.3