X86: Call ulldiv and ftol2 on Windows instead of their libgcc eqivilents.
[oota-llvm.git] / lib / Target / PIC16 / PIC16Section.h
index 350afb6e91d3fad9820d9fa0e03ca655476a9483..98e590229bd6bd4f6999859eebed6d8bc89bf025 100644 (file)
@@ -44,7 +44,8 @@ namespace llvm {
     unsigned Size;
     
     PIC16Section(StringRef name, SectionKind K, StringRef addr, int color)
-      : MCSection(K), Name(name), Address(addr), Color(color), Size(0) {
+      : MCSection(SV_PIC16, K), Name(name), Address(addr),
+        Color(color), Size(0) {
     }
     
   public:
@@ -63,6 +64,8 @@ namespace llvm {
     void setSize(unsigned size) { Size = size; }
 
     /// Conatined data objects.
+    // FIXME: This vector is leaked because sections are allocated with a
+    //        BumpPtrAllocator.
     std::vector<const GlobalVariable *>Items;
 
     /// Check section type. 
@@ -84,6 +87,13 @@ namespace llvm {
     /// to a section.
     virtual void PrintSwitchToSection(const MCAsmInfo &MAI,
                                       raw_ostream &OS) const;
+
+    virtual bool UseCodeAlign() const;
+
+    static bool classof(const MCSection *S) {
+      return S->getVariant() == SV_PIC16;
+    }
+    static bool classof(const PIC16Section *) { return true; }
   };
 
 } // end namespace llvm