Move get[S|U]LEB128Size() to LEB128.h.
[oota-llvm.git] / lib / Target / ARM / ARMTargetObjectFile.h
index b2e9ce51d1307ea13b2bd6b807ecfc2e8beb6ad6..aee5836141baff9e3b71306db6275569d0624e1f 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 =
-          getOrCreateSection(".init_array,\"aw\",%init_array", false,
-                             SectionKind::getDataRel());
-        StaticDtorSection =
-          getOrCreateSection(".fini_array,\"aw\",%fini_array", false,
-                             SectionKind::getDataRel());
-      }
-    }
-  };
+
+class MCContext;
+class TargetMachine;
+
+class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {
+protected:
+  const MCSection *AttributesSection;
+public:
+  ARMElfTargetObjectFile() :
+    TargetLoweringObjectFileELF(),
+    AttributesSection(NULL)
+  {}
+
+  void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE;
+
+  const MCExpr *
+  getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
+                          Mangler &Mang, const TargetMachine &TM,
+                          MachineModuleInfo *MMI, MCStreamer &Streamer) const
+      LLVM_OVERRIDE;
+
+  /// \brief Describe a TLS variable address within debug info.
+  const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const
+      LLVM_OVERRIDE;
+};
+
 } // end namespace llvm
 
 #endif