2008-07-19 13:14:11 +00:00
|
|
|
//===---- ELFTargetAsmInfo.h - ELF 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 ELF-based targets
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_ELF_TARGET_ASM_INFO_H
|
|
|
|
#define LLVM_ELF_TARGET_ASM_INFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetAsmInfo.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class GlobalValue;
|
|
|
|
class GlobalVariable;
|
2008-08-07 09:50:34 +00:00
|
|
|
class Type;
|
2008-07-19 13:14:11 +00:00
|
|
|
|
2008-09-25 21:00:33 +00:00
|
|
|
struct ELFTargetAsmInfo: public TargetAsmInfo {
|
2008-07-19 13:14:11 +00:00
|
|
|
explicit ELFTargetAsmInfo(const TargetMachine &TM);
|
|
|
|
|
2009-07-22 00:28:43 +00:00
|
|
|
/// getSectionForMergableConstant - Given a mergable constant with the
|
|
|
|
/// specified size and relocation information, return a section that it
|
|
|
|
/// should be placed in.
|
|
|
|
virtual const Section *
|
|
|
|
getSectionForMergableConstant(uint64_t Size, unsigned ReloInfo) const;
|
|
|
|
|
|
|
|
|
2009-03-30 15:27:43 +00:00
|
|
|
SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const;
|
2008-08-08 17:56:50 +00:00
|
|
|
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
|
2008-08-16 12:57:07 +00:00
|
|
|
virtual std::string printSectionFlags(unsigned flags) const;
|
2009-03-30 15:27:03 +00:00
|
|
|
|
|
|
|
const Section* DataRelSection;
|
|
|
|
const Section* DataRelLocalSection;
|
|
|
|
const Section* DataRelROSection;
|
|
|
|
const Section* DataRelROLocalSection;
|
2009-07-21 22:30:39 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
const Section* MergeableStringSection(const GlobalVariable *GV) const;
|
2008-07-19 13:14:11 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // LLVM_ELF_TARGET_ASM_INFO_H
|