Delete an unused function.
[oota-llvm.git] / include / llvm / CodeGen / AsmPrinter.h
index 4cdd1179da14fa31f246b34f880977490575ed1d..2eff50123a23b3de39204311e93653da5bea6065 100644 (file)
@@ -41,15 +41,18 @@ namespace llvm {
   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;
 
@@ -57,9 +60,6 @@ namespace llvm {
   /// 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;
@@ -94,12 +94,6 @@ namespace llvm {
     ///
     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.
@@ -111,8 +105,14 @@ namespace llvm {
     
     /// 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);
@@ -128,6 +128,16 @@ namespace llvm {
     ///
     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.
     //===------------------------------------------------------------------===//
@@ -341,7 +351,35 @@ namespace llvm {
     /// 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;
+    
+    /// EmitReference - Emit a reference to a label with a specified encoding.
+    ///
+    void EmitReference(const MCSymbol *Sym, unsigned Encoding) const;
+    void EmitReference(const GlobalValue *GV, unsigned Encoding) const;
+    
+    /// EmitSectionOffset - Emit the 4-byte offset of Label from the start of
+    /// its section.  This can be done with a special directive if the target
+    /// supports it (e.g. cygwin) or by emitting it as an offset from a label at
+    /// the start of the section.
+    ///
+    /// SectionLabel is a temporary label emitted at the start of the section
+    /// that Label lives in.
+    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
@@ -385,7 +423,7 @@ namespace llvm {
     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.