Remove a couple of already-implemented notes.
[oota-llvm.git] / lib / Target / PIC16 / PIC16AsmPrinter.h
index 5286dd2e7a38616b9257baa933051ea769f93516..0e05940caf4a0a0218a4d733c7ebb2b0a01a08c4 100644 (file)
@@ -1,4 +1,4 @@
-//===-- PIC16AsmPrinter.h - PIC16 LLVM assembly writer ------------------===//
+//===-- PIC16AsmPrinter.h - PIC16 LLVM assembly writer ----------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
 
 #include "PIC16.h"
 #include "PIC16TargetMachine.h"
+#include "PIC16DebugInfo.h"
+#include "llvm/Analysis/DebugInfo.h"
+#include "PIC16TargetAsmInfo.h"
 #include "llvm/CodeGen/AsmPrinter.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Target/TargetAsmInfo.h"
 #include "llvm/Target/TargetMachine.h"
+#include <list>
+#include <string>
 
 namespace llvm {
   struct VISIBILITY_HIDDEN PIC16AsmPrinter : public AsmPrinter {
-  PIC16AsmPrinter(raw_ostream &O, TargetMachine &TM,
-                    const TargetAsmInfo *T, bool F, bool V)
-      : AsmPrinter(O, TM, T, F, V) {
-      CurBank = "";
-      IsRomData = false;
+    explicit PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
+                             const TargetAsmInfo *T, bool V)
+      : AsmPrinter(O, TM, T, V), DbgInfo(O, T) {
+      PTLI = static_cast<const PIC16TargetLowering *> (TM.getTargetLowering());
+      PTAI = static_cast<const PIC16TargetAsmInfo *> (T);
     }
-    private :
+  private:
     virtual const char *getPassName() const {
       return "PIC16 Assembly Printer";
     }
@@ -40,19 +45,31 @@ namespace llvm {
     void printCCOperand(const MachineInstr *MI, int opNum);
     bool printInstruction(const MachineInstr *MI); // definition autogenerated.
     bool printMachineInstruction(const MachineInstr *MI);
-    void EmitExternsAndGlobals (Module &M);
-    void EmitInitData (Module &M);
-    void EmitUnInitData (Module &M);
+    void EmitFunctionDecls (Module &M);
+    void EmitUndefinedVars (Module &M);
+    void EmitDefinedVars (Module &M);
+    void EmitIData (Module &M);
+    void EmitUData (Module &M);
+    void EmitAutos (std::string FunctName);
+    void EmitRemainingAutos ();
     void EmitRomData (Module &M);
-    void emitFunctionData(MachineFunction &MF);
-
-    protected:
+    void EmitFunctionFrame(MachineFunction &MF);
+    void printLibcallDecls(void);
+  protected:
     bool doInitialization(Module &M);
     bool doFinalization(Module &M);
 
-    private:
-    std::string CurBank;
-    bool IsRomData;
+    /// PrintGlobalVariable - Emit the specified global variable and its
+    /// initializer to the output stream.
+    virtual void PrintGlobalVariable(const GlobalVariable *GV) {
+      // PIC16 doesn't use normal hooks for this.
+    }
+    
+  private:
+    PIC16TargetLowering *PTLI;
+    PIC16DbgInfo DbgInfo;
+    const PIC16TargetAsmInfo *PTAI;
+    std::list<const char *> LibcallDecls; // List of extern decls.
   };
 } // end of namespace