ARMv8 IfConversion must skip narrow instructions that a) define CPSR and b) wouldn...
[oota-llvm.git] / lib / Target / ARM / ARMTargetObjectFile.h
index 13fa7e202a003c3d4f10fb255e33319d531f016c..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() {}
-
-    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 {
+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