Add support for annotated disassembly output for X86 and arm.
[oota-llvm.git] / lib / Target / ARM / ARMTargetObjectFile.h
index b2e9ce51d1307ea13b2bd6b807ecfc2e8beb6ad6..c6a7261439d7b084166fc908e7e970214ebea90f 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)
+  {}
+
+  virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
+
+  virtual const MCSection *getAttributesSection() const {
+    return AttributesSection;
+  }
+};
+
 } // end namespace llvm
 
 #endif