LLVM API Documentation
00001 //=====-- MipsTargetAsmInfo.h - Mips asm properties -----------*- C++ -*--====// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the declaration of the MipsTargetAsmInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef MIPSTARGETASMINFO_H 00015 #define MIPSTARGETASMINFO_H 00016 00017 #include "MipsSubtarget.h" 00018 #include "llvm/DerivedTypes.h" 00019 #include "llvm/Target/TargetAsmInfo.h" 00020 #include "llvm/Target/TargetOptions.h" 00021 #include "llvm/Target/ELFTargetAsmInfo.h" 00022 00023 namespace llvm { 00024 00025 // Forward declaration. 00026 class GlobalValue; 00027 class MipsTargetMachine; 00028 00029 struct MipsTargetAsmInfo : public ELFTargetAsmInfo { 00030 explicit MipsTargetAsmInfo(const MipsTargetMachine &TM); 00031 00032 /// SectionKindForGlobal - This hook allows the target to select proper 00033 /// section kind used for global emission. 00034 virtual SectionKind::Kind 00035 SectionKindForGlobal(const GlobalValue *GV) const; 00036 00037 /// SectionFlagsForGlobal - This hook allows the target to select proper 00038 /// section flags either for given global or for section. 00039 virtual unsigned 00040 SectionFlagsForGlobal(const GlobalValue *GV = NULL, 00041 const char* name = NULL) const; 00042 00043 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; 00044 00045 private: 00046 const MipsSubtarget *Subtarget; 00047 }; 00048 00049 } // namespace llvm 00050 00051 #endif