1 //===-- X86TargetObjectFile.h - X86 Object Info -----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
11 #define LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
13 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
14 #include "llvm/Target/TargetLoweringObjectFile.h"
18 /// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
20 class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
22 X86_64MachoTargetObjectFile();
25 getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
26 Mangler &Mang, const TargetMachine &TM,
27 MachineModuleInfo *MMI,
28 MCStreamer &Streamer) const override;
30 // getCFIPersonalitySymbol - The symbol that gets passed to
32 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
33 const TargetMachine &TM,
34 MachineModuleInfo *MMI) const override;
37 getIndirectSymViaGOTPCRel(const MCSymbol *Sym,
38 int64_t Offset) const override;
41 /// X86LinuxTargetObjectFile - This implementation is used for linux x86
43 class X86LinuxTargetObjectFile : public TargetLoweringObjectFileELF {
44 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
46 /// \brief Describe a TLS variable address within debug info.
47 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
50 /// \brief This TLOF implementation is used for PS4.
51 class PS4TargetObjectFile : public TargetLoweringObjectFileELF {
52 /// \brief Describe a TLS variable address within debug info.
53 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
56 /// \brief This implementation is used for Windows targets on x86 and x86-64.
57 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
59 getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
60 const TargetMachine &TM) const override;
62 /// \brief Given a mergeable constant with the specified size and relocation
63 /// information, return a section that it should be placed in.
64 const MCSection *getSectionForConstant(SectionKind Kind,
65 const Constant *C) const override;
68 } // end namespace llvm