class MachineConstantPoolValue;
class MachineJumpTableInfo;
class MachineModuleInfo;
+ class MachineMove;
+ class MCAsmInfo;
class MCInst;
class MCContext;
class MCSection;
class MCStreamer;
class MCSymbol;
- class DwarfWriter;
+ class DwarfDebug;
+ class DwarfException;
class Mangler;
- class MCAsmInfo;
class TargetLoweringObjectFile;
+ class TargetData;
class Twine;
class Type;
/// asm writers.
class AsmPrinter : public MachineFunctionPass {
public:
- /// DW - If available, this is a pointer to the current dwarf writer.
- DwarfWriter *DW;
-
/// Target machine description.
///
TargetMachine &TM;
///
MCSymbol *CurrentFnSym;
- /// getObjFileLowering - Return information about object file lowering.
- TargetLoweringObjectFile &getObjFileLowering() const;
-
- /// getCurrentSection() - Return the current section we are emitting to.
- const MCSection *getCurrentSection() const;
-
private:
// GCMetadataPrinters - The garbage collection metadata printer table.
void *GCMetadataPrinters; // Really a DenseMap.
/// If VerboseAsm is set, a pointer to the loop info for this
/// function.
- ///
MachineLoopInfo *LI;
+
+ /// DD - If the target supports dwarf debug info, this pointer is non-null.
+ DwarfDebug *DD;
+
+ /// DE - If the target supports dwarf exception info, this pointer is
+ /// non-null.
+ DwarfException *DE;
protected:
explicit AsmPrinter(TargetMachine &TM, MCStreamer &Streamer);
///
unsigned getFunctionNumber() const;
+ /// getObjFileLowering - Return information about object file lowering.
+ TargetLoweringObjectFile &getObjFileLowering() const;
+
+ /// getTargetData - Return information about data layout.
+ const TargetData &getTargetData() const;
+
+ /// getCurrentSection() - Return the current section we are emitting to.
+ const MCSection *getCurrentSection() const;
+
+
//===------------------------------------------------------------------===//
// MachineFunctionPass Implementation.
//===------------------------------------------------------------------===//
/// encoding. If verbose assembly output is enabled, we output comments
/// describing the encoding. Desc is a string saying what the encoding is
/// specifying (e.g. "LSDA").
- void EmitEncodingByte(unsigned Val, const char *Desc = 0);
+ void EmitEncodingByte(unsigned Val, const char *Desc = 0) const;
/// GetSizeOfEncodedValue - Return the size of the encoding in bytes.
unsigned GetSizeOfEncodedValue(unsigned Encoding) const;
void EmitSectionOffset(const MCSymbol *Label,
const MCSymbol *SectionLabel) const;
+ //===------------------------------------------------------------------===//
+ // Dwarf Lowering Routines
+ //===------------------------------------------------------------------===//
+
+ /// EmitFrameMoves - Emit frame instructions to describe the layout of the
+ /// frame.
+ void EmitFrameMoves(const std::vector<MachineMove> &Moves,
+ MCSymbol *BaseLabel, bool isEH) const;
+
//===------------------------------------------------------------------===//
// Inline Asm Support
mutable unsigned SetCounter;
/// EmitInlineAsm - Emit a blob of inline asm to the output streamer.
- void EmitInlineAsm(StringRef Str) const;
+ void EmitInlineAsm(StringRef Str, unsigned LocCookie) const;
/// EmitInlineAsm - This method formats and emits the specified machine
/// instruction that is an inline asm.