blob: da0eeeb3fd2805370b66c8eb12058cd0581bbf02 [file] [log] [blame]
Jia Liub22310f2012-02-18 12:03:15 +00001//===-- HexagonTargetAsmInfo.h - Hexagon asm properties --------*- C++ -*--===//
Tony Linthicum1213a7a2011-12-12 21:14:40 +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//
8//===----------------------------------------------------------------------===//
9
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000010#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H
11#define LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H
Tony Linthicum1213a7a2011-12-12 21:14:40 +000012
13#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
14#include "llvm/MC/MCSectionELF.h"
15
16namespace llvm {
17
18 class HexagonTargetObjectFile : public TargetLoweringObjectFileELF {
Rafael Espindola0709a7b2015-05-21 19:20:38 +000019 MCSectionELF *SmallDataSection;
20 MCSectionELF *SmallBSSSection;
21
Tony Linthicum1213a7a2011-12-12 21:14:40 +000022 public:
Craig Topper73156022014-03-02 09:09:27 +000023 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
Tony Linthicum1213a7a2011-12-12 21:14:40 +000024
25 /// IsGlobalInSmallSection - Return true if this global address should be
26 /// placed into small data/bss section.
27 bool IsGlobalInSmallSection(const GlobalValue *GV,
28 const TargetMachine &TM,
29 SectionKind Kind) const;
30 bool IsGlobalInSmallSection(const GlobalValue *GV,
31 const TargetMachine &TM) const;
32
Jyotsna Verma5eb59802013-05-07 19:53:00 +000033 bool IsSmallDataEnabled () const;
Rafael Espindola0709a7b2015-05-21 19:20:38 +000034 MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
35 Mangler &Mang,
36 const TargetMachine &TM) const override;
Tony Linthicum1213a7a2011-12-12 21:14:40 +000037 };
38
39} // namespace llvm
40
41#endif