Add dependency to "make check".
[oota-llvm.git] / include / llvm / Target / TargetAsmInfo.h
1 //===-- llvm/Target/TargetAsmInfo.h -----------------------------*- 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 // Interface to provide the information necessary for producing assembly files.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_TARGET_TARGETASMINFO_H
15 #define LLVM_TARGET_TARGETASMINFO_H
16
17 #include "llvm/CodeGen/MachineLocation.h"
18 #include "llvm/Target/TargetLoweringObjectFile.h"
19 #include "llvm/Target/TargetFrameInfo.h"
20 #include "llvm/Target/TargetRegisterInfo.h"
21
22 namespace llvm {
23   class MCSection;
24   class MCContext;
25   class TargetMachine;
26   class TargetLoweringObjectFile;
27
28 class TargetAsmInfo {
29   unsigned PointerSize;
30   bool IsLittleEndian;
31   TargetFrameInfo::StackDirection StackDir;
32   const TargetRegisterInfo *TRI;
33   std::vector<MachineMove> InitialFrameState;
34   const TargetLoweringObjectFile *TLOF;
35
36 public:
37   explicit TargetAsmInfo(const TargetMachine &TM);
38
39   /// getPointerSize - Get the pointer size in bytes.
40   unsigned getPointerSize() const {
41     return PointerSize;
42   }
43
44   /// islittleendian - True if the target is little endian.
45   bool isLittleEndian() const {
46     return IsLittleEndian;
47   }
48
49   TargetFrameInfo::StackDirection getStackGrowthDirection() const {
50     return StackDir;
51   }
52
53   const MCSection *getDwarfLineSection() const {
54     return TLOF->getDwarfLineSection();
55   }
56
57   const MCSection *getEHFrameSection() const {
58     return TLOF->getEHFrameSection();
59   }
60
61   unsigned getDwarfRARegNum(bool isEH) const {
62     return TRI->getDwarfRegNum(TRI->getRARegister(), isEH);
63   }
64
65   const std::vector<MachineMove> &getInitialFrameState() const {
66     return InitialFrameState;
67   }
68
69   int getDwarfRegNum(unsigned RegNum, bool isEH) const {
70     return TRI->getDwarfRegNum(RegNum, isEH);
71   }
72 };
73
74 }
75 #endif