2011-04-15 21:51:11 +00:00
|
|
|
//===-- llvm/Target/MipsTargetObjectFile.h - Mips Object Info ---*- C++ -*-===//
|
2009-08-13 06:28:06 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2009-08-13 06:28:06 +00:00
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETOBJECTFILE_H
|
|
|
|
#define LLVM_LIB_TARGET_MIPS_MIPSTARGETOBJECTFILE_H
|
2009-08-13 06:28:06 +00:00
|
|
|
|
2010-02-15 22:37:53 +00:00
|
|
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
2009-08-13 06:28:06 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class MipsTargetObjectFile : public TargetLoweringObjectFileELF {
|
|
|
|
const MCSection *SmallDataSection;
|
|
|
|
const MCSection *SmallBSSSection;
|
2014-11-06 13:20:12 +00:00
|
|
|
const TargetMachine *TM;
|
2009-08-13 06:28:06 +00:00
|
|
|
public:
|
2011-03-04 17:51:39 +00:00
|
|
|
|
2014-03-02 09:09:27 +00:00
|
|
|
void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
|
2009-08-13 06:28:06 +00:00
|
|
|
|
2014-11-06 13:20:12 +00:00
|
|
|
/// Return true if this global address should be placed into small data/bss
|
|
|
|
/// section.
|
|
|
|
bool IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM,
|
|
|
|
SectionKind Kind) const;
|
2009-08-13 06:28:06 +00:00
|
|
|
bool IsGlobalInSmallSection(const GlobalValue *GV,
|
2011-03-04 17:51:39 +00:00
|
|
|
const TargetMachine &TM) const;
|
2014-11-06 13:20:12 +00:00
|
|
|
bool IsGlobalInSmallSectionImpl(const GlobalValue *GV,
|
|
|
|
const TargetMachine &TM) const;
|
2011-03-04 17:51:39 +00:00
|
|
|
|
2009-08-13 06:28:06 +00:00
|
|
|
const MCSection *SelectSectionForGlobal(const GlobalValue *GV,
|
2014-03-02 09:09:27 +00:00
|
|
|
SectionKind Kind, Mangler &Mang,
|
|
|
|
const TargetMachine &TM) const override;
|
2014-11-06 13:20:12 +00:00
|
|
|
|
|
|
|
/// Return true if this constant should be placed into small data section.
|
|
|
|
bool IsConstantInSmallSection(const Constant *CN,
|
|
|
|
const TargetMachine &TM) const;
|
|
|
|
|
|
|
|
const MCSection *getSectionForConstant(SectionKind Kind,
|
|
|
|
const Constant *C) const override;
|
2009-08-13 06:28:06 +00:00
|
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|