LLVM API Documentation
00001 //===---- DarwinTargetAsmInfo.h - Darwin 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 defines target asm properties related what form asm statements 00011 // should take in general on Darwin-based targets 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #ifndef LLVM_DARWIN_TARGET_ASM_INFO_H 00016 #define LLVM_DARWIN_TARGET_ASM_INFO_H 00017 00018 #include "llvm/Target/TargetAsmInfo.h" 00019 00020 namespace llvm { 00021 class GlobalValue; 00022 class GlobalVariable; 00023 class Type; 00024 class Mangler; 00025 00026 struct DarwinTargetAsmInfo: public TargetAsmInfo { 00027 const Section* TextCoalSection; 00028 const Section* ConstTextCoalSection; 00029 const Section* ConstDataCoalSection; 00030 const Section* ConstDataSection; 00031 const Section* DataCoalSection; 00032 const Section* FourByteConstantSection; 00033 const Section* EightByteConstantSection; 00034 const Section* SixteenByteConstantSection; 00035 00036 explicit DarwinTargetAsmInfo(const TargetMachine &TM); 00037 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; 00038 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV, 00039 SectionKind::Kind kind) const; 00040 virtual bool emitUsedDirectiveFor(const GlobalValue *GV, 00041 Mangler *Mang) const; 00042 const Section* MergeableConstSection(const GlobalVariable *GV) const; 00043 const Section* MergeableConstSection(const Type *Ty) const; 00044 const Section* MergeableStringSection(const GlobalVariable *GV) const; 00045 const Section* SelectSectionForMachineConst(const Type *Ty) const; 00046 }; 00047 } 00048 00049 00050 #endif // LLVM_DARWIN_TARGET_ASM_INFO_H