blob: 2b5a739e7219ea9c271ed536a75a7b0058bfe577 [file] [log] [blame]
Bruno Cardoso Lopes972f5892007-06-06 07:42:06 +00001//=====-- MipsTargetAsmInfo.h - Mips asm properties -----------*- C++ -*--====//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Bruno Cardoso Lopes972f5892007-06-06 07:42:06 +00007//
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 Lopes92e87f22008-07-23 16:01:50 +000017#include "MipsSubtarget.h"
Bruno Cardoso Lopesfeb95cc2008-07-22 15:34:27 +000018#include "llvm/DerivedTypes.h"
Bruno Cardoso Lopes92e87f22008-07-23 16:01:50 +000019#include "llvm/Target/TargetAsmInfo.h"
Bruno Cardoso Lopesfeb95cc2008-07-22 15:34:27 +000020#include "llvm/Target/TargetOptions.h"
Bruno Cardoso Lopes92e87f22008-07-23 16:01:50 +000021#include "llvm/Target/ELFTargetAsmInfo.h"
Bruno Cardoso Lopes972f5892007-06-06 07:42:06 +000022
23namespace llvm {
24
25 // Forward declaration.
Dan Gohman8f613f32008-08-05 15:32:23 +000026 class GlobalValue;
Bruno Cardoso Lopes972f5892007-06-06 07:42:06 +000027 class MipsTargetMachine;
28
Anton Korobeynikovae408e62008-07-19 13:16:11 +000029 struct MipsTargetAsmInfo : public ELFTargetAsmInfo {
Dan Gohman677ccc62007-09-25 20:27:06 +000030 explicit MipsTargetAsmInfo(const MipsTargetMachine &TM);
Bruno Cardoso Lopesfeb95cc2008-07-22 15:34:27 +000031
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 Lopesea7930e2008-07-30 17:04:04 +000037 /// 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 Lopesfeb95cc2008-07-22 15:34:27 +000043 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
44
45 private:
Bruno Cardoso Lopes92e87f22008-07-23 16:01:50 +000046 const MipsSubtarget *Subtarget;
Bruno Cardoso Lopes972f5892007-06-06 07:42:06 +000047 };
48
49} // namespace llvm
50
51#endif