LLVM API Documentation
00001 //===-- X86TargetObjectFile.h - X86 Object Info -----------------*- 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 #ifndef LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H 00011 #define LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H 00012 00013 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" 00014 #include "llvm/Target/TargetLoweringObjectFile.h" 00015 00016 namespace llvm { 00017 00018 /// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin 00019 /// x86-64. 00020 class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO { 00021 public: 00022 const MCExpr * 00023 getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, 00024 Mangler &Mang, const TargetMachine &TM, 00025 MachineModuleInfo *MMI, 00026 MCStreamer &Streamer) const override; 00027 00028 // getCFIPersonalitySymbol - The symbol that gets passed to 00029 // .cfi_personality. 00030 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, 00031 const TargetMachine &TM, 00032 MachineModuleInfo *MMI) const override; 00033 }; 00034 00035 /// X86LinuxTargetObjectFile - This implementation is used for linux x86 00036 /// and x86-64. 00037 class X86LinuxTargetObjectFile : public TargetLoweringObjectFileELF { 00038 void Initialize(MCContext &Ctx, const TargetMachine &TM) override; 00039 00040 /// \brief Describe a TLS variable address within debug info. 00041 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override; 00042 }; 00043 00044 /// \brief This implementation is used for Windows targets on x86 and x86-64. 00045 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF { 00046 const MCExpr * 00047 getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang, 00048 const TargetMachine &TM) const override; 00049 00050 /// \brief Given a mergeable constant with the specified size and relocation 00051 /// information, return a section that it should be placed in. 00052 const MCSection *getSectionForConstant(SectionKind Kind, 00053 const Constant *C) const override; 00054 }; 00055 00056 } // end namespace llvm 00057 00058 #endif