Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | //=====-- MipsTargetAsmInfo.h - Mips asm properties -----------*- C++ -*--====// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 081ce94 | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains the declaration of the MipsTargetAsmInfo class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef MIPSTARGETASMINFO_H |
| 15 | #define MIPSTARGETASMINFO_H |
| 16 | |
Bruno Cardoso Lopes | 69ca2ca | 2008-07-23 16:01:50 +0000 | [diff] [blame] | 17 | #include "MipsSubtarget.h" |
Bruno Cardoso Lopes | 8291a62 | 2008-07-22 15:34:27 +0000 | [diff] [blame] | 18 | #include "llvm/DerivedTypes.h" |
| 19 | #include "llvm/GlobalVariable.h" |
Bruno Cardoso Lopes | 69ca2ca | 2008-07-23 16:01:50 +0000 | [diff] [blame] | 20 | #include "llvm/Target/TargetAsmInfo.h" |
Bruno Cardoso Lopes | 8291a62 | 2008-07-22 15:34:27 +0000 | [diff] [blame] | 21 | #include "llvm/Target/TargetOptions.h" |
Bruno Cardoso Lopes | 69ca2ca | 2008-07-23 16:01:50 +0000 | [diff] [blame] | 22 | #include "llvm/Target/ELFTargetAsmInfo.h" |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 23 | |
| 24 | namespace llvm { |
| 25 | |
| 26 | // Forward declaration. |
| 27 | class MipsTargetMachine; |
| 28 | |
asl | dedcd84 | 2008-07-19 13:16:11 +0000 | [diff] [blame] | 29 | struct MipsTargetAsmInfo : public ELFTargetAsmInfo { |
Dan Gohman | cdd820b | 2007-09-25 20:27:06 +0000 | [diff] [blame] | 30 | explicit MipsTargetAsmInfo(const MipsTargetMachine &TM); |
Bruno Cardoso Lopes | 8291a62 | 2008-07-22 15:34:27 +0000 | [diff] [blame] | 31 | |
| 32 | /// SectionKindForGlobal - This hook allows the target to select proper |
| 33 | /// section kind used for global emission. |
| 34 | virtual SectionKind::Kind |
| 35 | SectionKindForGlobal(const GlobalValue *GV) const; |
| 36 | |
Bruno Cardoso Lopes | 91c2ada | 2008-07-30 17:04:04 +0000 | [diff] [blame^] | 37 | /// SectionFlagsForGlobal - This hook allows the target to select proper |
| 38 | /// section flags either for given global or for section. |
| 39 | virtual unsigned |
| 40 | SectionFlagsForGlobal(const GlobalValue *GV = NULL, |
| 41 | const char* name = NULL) const; |
| 42 | |
Bruno Cardoso Lopes | 8291a62 | 2008-07-22 15:34:27 +0000 | [diff] [blame] | 43 | virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; |
| 44 | |
| 45 | private: |
Bruno Cardoso Lopes | 69ca2ca | 2008-07-23 16:01:50 +0000 | [diff] [blame] | 46 | const MipsSubtarget *Subtarget; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | } // namespace llvm |
| 50 | |
| 51 | #endif |