aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips/MipsTargetAsmInfo.h
blob: 74bba10b2393ec080ddfacd7a891229fd3f3ea2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//=====-- MipsTargetAsmInfo.h - Mips asm properties -----------*- C++ -*--====//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains the declaration of the MipsTargetAsmInfo class.
//
//===----------------------------------------------------------------------===//

#ifndef MIPSTARGETASMINFO_H
#define MIPSTARGETASMINFO_H

#include "MipsSubtarget.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/ELFTargetAsmInfo.h"

namespace llvm {

  // Forward declaration.
  class GlobalValue;
  class MipsTargetMachine;

  struct MipsTargetAsmInfo : public ELFTargetAsmInfo {
    explicit MipsTargetAsmInfo(const MipsTargetMachine &TM);

    /// SectionKindForGlobal - This hook allows the target to select proper
    /// section kind used for global emission.
    virtual SectionKind::Kind
    SectionKindForGlobal(const GlobalValue *GV) const;

    virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;

    private:
      const MipsSubtarget *Subtarget;
  };

} // namespace llvm

#endif