1 //===-- llvm/Target/MipsTargetObjectFile.h - Mips Object Info ---*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_MIPS_MIPSTARGETOBJECTFILE_H
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
15 class MipsTargetMachine
;
16 class MipsTargetObjectFile
: public TargetLoweringObjectFileELF
{
17 MCSection
*SmallDataSection
;
18 MCSection
*SmallBSSSection
;
19 const MipsTargetMachine
*TM
;
21 bool IsGlobalInSmallSection(const GlobalObject
*GO
, const TargetMachine
&TM
,
22 SectionKind Kind
) const;
23 bool IsGlobalInSmallSectionImpl(const GlobalObject
*GO
,
24 const TargetMachine
&TM
) const;
27 void Initialize(MCContext
&Ctx
, const TargetMachine
&TM
) override
;
29 /// Return true if this global address should be placed into small data/bss
31 bool IsGlobalInSmallSection(const GlobalObject
*GO
,
32 const TargetMachine
&TM
) const;
34 MCSection
*SelectSectionForGlobal(const GlobalObject
*GO
, SectionKind Kind
,
35 const TargetMachine
&TM
) const override
;
37 /// Return true if this constant should be placed into small data section.
38 bool IsConstantInSmallSection(const DataLayout
&DL
, const Constant
*CN
,
39 const TargetMachine
&TM
) const;
41 MCSection
*getSectionForConstant(const DataLayout
&DL
, SectionKind Kind
,
43 Align
&Alignment
) const override
;
44 /// Describe a TLS variable address within debug info.
45 const MCExpr
*getDebugThreadLocalSymbol(const MCSymbol
*Sym
) const override
;
47 } // end namespace llvm