From f80e6081fcec250345117ca6594b9c0883b8ca98 Mon Sep 17 00:00:00 2001 From: asl Date: Sat, 19 Jul 2008 13:14:46 +0000 Subject: Add TargetAsmInfo stuff for all darwin-based targets git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53787 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/DarwinTargetAsmInfo.h | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 include/llvm/Target/DarwinTargetAsmInfo.h (limited to 'include') diff --git a/include/llvm/Target/DarwinTargetAsmInfo.h b/include/llvm/Target/DarwinTargetAsmInfo.h new file mode 100644 index 0000000..769273d --- /dev/null +++ b/include/llvm/Target/DarwinTargetAsmInfo.h @@ -0,0 +1,43 @@ +//===---- DarwinTargetAsmInfo.h - Darwin asm properties ---------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines target asm properties related what form asm statements +// should take in general on Darwin-based targets +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ELF_TARGET_ASM_INFO_H +#define LLVM_ELF_TARGET_ASM_INFO_H + +#include "llvm/Target/TargetAsmInfo.h" +#include "llvm/Target/TargetMachine.h" + +namespace llvm { + class GlobalValue; + class GlobalVariable; + + class DarwinTargetAsmInfo: public TargetAsmInfo { + const Section* TextCoalSection; + const Section* ConstDataCoalSection; + const Section* ConstDataSection; + const Section* DataCoalSection; + + explicit DarwinTargetAsmInfo(const TargetMachine &TM); + virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; + virtual std::string UniqueSectionForGlobal(const GlobalValue* GV, + SectionKind::Kind kind) const; + const Section* MergeableConstSection(const GlobalVariable *GV) const; + const Section* MergeableStringSection(const GlobalVariable *GV) const; + protected: + const TargetMachine* ETM; + }; +} + + +#endif // LLVM_ELF_TARGET_ASM_INFO_H -- cgit v1.1