#ifndef LLVM_MC_MCSTREAMER_H
#define LLVM_MC_MCSTREAMER_H
-#include "llvm/Support/DataTypes.h"
+#include "llvm/System/DataTypes.h"
namespace llvm {
- class AsmPrinter;
class MCAsmInfo;
class MCCodeEmitter;
class MCContext;
+ class MCExpr;
class MCInst;
+ class MCInstPrinter;
class MCSection;
class MCSymbol;
- class MCValue;
class StringRef;
class raw_ostream;
///
/// @param Symbol - The symbol being assigned to.
/// @param Value - The value for the symbol.
- /// @param MakeAbsolute - If true, then the symbol should be given the
- /// absolute value of @param Value, even if @param Value would be
- /// relocatable expression. This corresponds to the ".set" directive.
- virtual void EmitAssignment(MCSymbol *Symbol, const MCValue &Value,
- bool MakeAbsolute = false) = 0;
+ virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) = 0;
/// EmitSymbolAttribute - Add the given @param Attribute to @param Symbol.
virtual void EmitSymbolAttribute(MCSymbol *Symbol,
/// @param Value - The value to emit.
/// @param Size - The size of the integer (in bytes) to emit. This must
/// match a native machine width.
- virtual void EmitValue(const MCValue &Value, unsigned Size) = 0;
+ virtual void EmitValue(const MCExpr *Value, unsigned Size) = 0;
/// EmitValueToAlignment - Emit some number of copies of @param Value until
/// the byte alignment @param ByteAlignment is reached.
///
/// This is used to implement assembler directives such as .org.
///
- /// @param Offset - The offset to reach.This may be an expression, but the
+ /// @param Offset - The offset to reach. This may be an expression, but the
/// expression must be associated with the current section.
/// @param Value - The value to use when filling bytes.
- //
- // FIXME: How are we going to signal failures out of this?
- virtual void EmitValueToOffset(const MCValue &Offset,
+ virtual void EmitValueToOffset(const MCExpr *Offset,
unsigned char Value = 0) = 0;
/// @}
/// createAsmStreamer - Create a machine code streamer which will print out
/// assembly for the native target, suitable for compiling with a native
/// assembler.
- ///
- /// \arg AP - If given, an AsmPrinter to use for printing instructions.
MCStreamer *createAsmStreamer(MCContext &Ctx, raw_ostream &OS,
- const MCAsmInfo &MAI, AsmPrinter *AP = 0,
+ const MCAsmInfo &MAI,
+ MCInstPrinter *InstPrint = 0,
MCCodeEmitter *CE = 0);
// FIXME: These two may end up getting rolled into a single