blob: c0e9140c829cb92169e47d4500e5d14cc9e978ec [file] [log] [blame]
Akira Hatanaka4552c9a2011-04-15 21:51:11 +00001//===-- llvm/Target/MipsTargetObjectFile.h - Mips Object Info ---*- C++ -*-===//
Chris Lattnerb71b9092009-08-13 06:28:06 +00002//
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//
Akira Hatanaka4552c9a2011-04-15 21:51:11 +00008//===----------------------------------------------------------------------===//
Chris Lattnerb71b9092009-08-13 06:28:06 +00009
10#ifndef LLVM_TARGET_MIPS_TARGETOBJECTFILE_H
11#define LLVM_TARGET_MIPS_TARGETOBJECTFILE_H
12
Anton Korobeynikov362dd0b2010-02-15 22:37:53 +000013#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Chris Lattnerb71b9092009-08-13 06:28:06 +000014
15namespace llvm {
16
17 class MipsTargetObjectFile : public TargetLoweringObjectFileELF {
18 const MCSection *SmallDataSection;
19 const MCSection *SmallBSSSection;
Jack Carterc91cbb92013-01-18 21:20:38 +000020 const MCSection *ReginfoSection;
Chris Lattnerb71b9092009-08-13 06:28:06 +000021 public:
Bruno Cardoso Lopes81092dc2011-03-04 17:51:39 +000022
Chris Lattnerb71b9092009-08-13 06:28:06 +000023 void Initialize(MCContext &Ctx, const TargetMachine &TM);
24
Bruno Cardoso Lopes81092dc2011-03-04 17:51:39 +000025
Chris Lattnerb71b9092009-08-13 06:28:06 +000026 /// IsGlobalInSmallSection - Return true if this global address should be
27 /// placed into small data/bss section.
28 bool IsGlobalInSmallSection(const GlobalValue *GV,
Akira Hatanaka4552c9a2011-04-15 21:51:11 +000029 const TargetMachine &TM, SectionKind Kind)const;
Chris Lattnerb71b9092009-08-13 06:28:06 +000030 bool IsGlobalInSmallSection(const GlobalValue *GV,
Bruno Cardoso Lopes81092dc2011-03-04 17:51:39 +000031 const TargetMachine &TM) const;
32
Chris Lattnerb71b9092009-08-13 06:28:06 +000033 const MCSection *SelectSectionForGlobal(const GlobalValue *GV,
34 SectionKind Kind,
35 Mangler *Mang,
36 const TargetMachine &TM) const;
Bruno Cardoso Lopes81092dc2011-03-04 17:51:39 +000037
Chris Lattnerb71b9092009-08-13 06:28:06 +000038 // TODO: Classify globals as mips wishes.
Jack Carterc91cbb92013-01-18 21:20:38 +000039 const MCSection *getReginfoSection() const { return ReginfoSection; }
Chris Lattnerb71b9092009-08-13 06:28:06 +000040 };
41} // end namespace llvm
42
43#endif