xref: /freebsd/contrib/llvm-project/llvm/lib/Target/XCore/XCoreTargetObjectFile.h (revision e25152834cdf3b353892835a4f3b157e066a8ed4)
1 //===-- XCoreTargetObjectFile.h - XCore Object Info -------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_XCORE_XCORETARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_XCORE_XCORETARGETOBJECTFILE_H
11 
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
13 
14 namespace llvm {
15 
16 static const unsigned CodeModelLargeSize = 256;
17 
18   class XCoreTargetObjectFile : public TargetLoweringObjectFileELF {
19     MCSection *BSSSectionLarge;
20     MCSection *DataSectionLarge;
21     MCSection *ReadOnlySectionLarge;
22     MCSection *DataRelROSectionLarge;
23 
24   public:
25     void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
26 
27     MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind,
28                                         const TargetMachine &TM) const override;
29 
30     MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
31                                       const TargetMachine &TM) const override;
32 
33     MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
34                                      const Constant *C,
35                                      Align &Alignment) const override;
36   };
37 } // end namespace llvm
38 
39 #endif
40