eliminate the X86 version of GetGlobalValueSymbol, allowing
[oota-llvm.git] / lib / Target / ARM / ARMTargetObjectFile.h
index 55f13b170a462f8bcaa4e5d2fdf3ca4a3314caa3..481d7abd31073705dad94331cebb29135feaf36b 100644 (file)
 #ifndef LLVM_TARGET_ARM_TARGETOBJECTFILE_H
 #define LLVM_TARGET_ARM_TARGETOBJECTFILE_H
 
-#include "llvm/Target/TargetLoweringObjectFile.h"
+#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
 
 namespace llvm {
-  
-  class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
-  public:
-    ARMElfTargetObjectFile() : TargetLoweringObjectFileELF(true) {}
-    
-    void Initialize(MCContext &Ctx, const TargetMachine &TM) {
-      TargetLoweringObjectFileELF::Initialize(Ctx, TM);
-      
-      // FIXME: Add new attribute/flag to MCSection for init_array/fini_array.
-      // That will allow not treating these as "directives".
-      if (TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI()) {
-        StaticCtorSection =
-          getELFSection("\t.section .init_array,\"aw\",%init_array", true,
-                        SectionKind::getDataRel());
-        StaticDtorSection =
-          getELFSection("\t.section .fini_array,\"aw\",%fini_array", true,
-                        SectionKind::getDataRel());
-      }
-    }
-  };
+
+class MCContext;
+class TargetMachine;
+
+class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
+public:
+  ARMElfTargetObjectFile() : TargetLoweringObjectFileELF() {}
+
+  virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
+};
+
+// FIXME: This subclass isn't 100% necessary. It will become obsolete once we
+//        can place all LSDAs into the TEXT section. See
+//        <rdar://problem/6804645>.
+class ARMMachOTargetObjectFile : public TargetLoweringObjectFileMachO {
+public:
+  ARMMachOTargetObjectFile() : TargetLoweringObjectFileMachO() {}
+
+  virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
+
+  virtual unsigned getTTypeEncoding() const;
+};
+
 } // end namespace llvm
 
 #endif