]> git.proxmox.com Git - rustc.git/blob - src/llvm/lib/Target/Mips/MipsTargetObjectFile.h
Imported Upstream version 1.0.0+dfsg1
[rustc.git] / src / llvm / lib / Target / Mips / MipsTargetObjectFile.h
1 //===-- llvm/Target/MipsTargetObjectFile.h - Mips Object Info ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETOBJECTFILE_H
11 #define LLVM_LIB_TARGET_MIPS_MIPSTARGETOBJECTFILE_H
12
13 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
14
15 namespace llvm {
16
17 class MipsTargetObjectFile : public TargetLoweringObjectFileELF {
18 const MCSection *SmallDataSection;
19 const MCSection *SmallBSSSection;
20 const TargetMachine *TM;
21 public:
22
23 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
24
25 /// Return true if this global address should be placed into small data/bss
26 /// section.
27 bool IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM,
28 SectionKind Kind) const;
29 bool IsGlobalInSmallSection(const GlobalValue *GV,
30 const TargetMachine &TM) const;
31 bool IsGlobalInSmallSectionImpl(const GlobalValue *GV,
32 const TargetMachine &TM) const;
33
34 const MCSection *SelectSectionForGlobal(const GlobalValue *GV,
35 SectionKind Kind, Mangler &Mang,
36 const TargetMachine &TM) const override;
37
38 /// Return true if this constant should be placed into small data section.
39 bool IsConstantInSmallSection(const Constant *CN,
40 const TargetMachine &TM) const;
41
42 const MCSection *getSectionForConstant(SectionKind Kind,
43 const Constant *C) const override;
44 };
45 } // end namespace llvm
46
47 #endif