introduce a new RoundUpAlignment helper function, use it to
[oota-llvm.git] / include / llvm / Target / TargetMachOWriterInfo.h
index 6276bcfd9c31fd141e72be1804d354d709dfe26f..f723bb5bee6a5d95951fbfabde652e3004e1c0f3 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Bill Wendling and is distributed under the
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
 namespace llvm {
 
   class MachineBasicBlock;
+  class OutputBuffer;
 
   //===--------------------------------------------------------------------===//
   //                        TargetMachOWriterInfo
   //===--------------------------------------------------------------------===//
 
-  struct TargetMachOWriterInfo {
+  class TargetMachOWriterInfo {
     uint32_t CPUType;                 // CPU specifier
     uint32_t CPUSubType;              // Machine specifier
-
+  public:
     // The various CPU_TYPE_* constants are already defined by at least one
     // system header file and create compilation errors if not respected.
 #if !defined(CPU_TYPE_I386)
@@ -88,14 +89,22 @@ namespace llvm {
 
     TargetMachOWriterInfo(uint32_t cputype, uint32_t cpusubtype)
       : CPUType(cputype), CPUSubType(cpusubtype) {}
-    virtual ~TargetMachOWriterInfo() {}
+    virtual ~TargetMachOWriterInfo();
 
     virtual MachineRelocation GetJTRelocation(unsigned Offset,
                                               MachineBasicBlock *MBB) const;
 
-    virtual const char *getPassName() const {
-      return "Mach-O Writer";
-    }
+    virtual unsigned GetTargetRelocation(MachineRelocation &MR,
+                                         unsigned FromIdx,
+                                         unsigned ToAddr,
+                                         unsigned ToIdx,
+                                         OutputBuffer &RelocOut,
+                                         OutputBuffer &SecOut,
+                                         bool Scattered,
+                                         bool Extern) const { return 0; }
+
+    uint32_t getCPUType() const { return CPUType; }
+    uint32_t getCPUSubType() const { return CPUSubType; }
   };
 
 } // end llvm namespace