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 {
23 getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
24 Mangler &Mang, const TargetMachine &TM,
25 MachineModuleInfo *MMI,
26 MCStreamer &Streamer) const override;
28 // getCFIPersonalitySymbol - The symbol that gets passed to
30 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
31 const TargetMachine &TM,
32 MachineModuleInfo *MMI) const override;
34 const MCExpr *getIndirectSymViaGOTPCRel(const MCSymbol *Sym,
35 const MCValue &MV, int64_t Offset,
36 MachineModuleInfo *MMI,
37 MCStreamer &Streamer) const override;
40 /// \brief This implemenatation is used for X86 ELF targets that don't
41 /// have a further specialization.
42 class X86ELFTargetObjectFile : public TargetLoweringObjectFileELF {
43 /// \brief Describe a TLS variable address within debug info.
44 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
47 /// X86LinuxNaClTargetObjectFile - This implementation is used for linux and
48 /// Native Client on x86 and x86-64.
49 class X86LinuxNaClTargetObjectFile : public X86ELFTargetObjectFile {
50 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
53 /// \brief This implementation is used for Windows targets on x86 and x86-64.
54 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
56 getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
57 const TargetMachine &TM) const override;
59 /// \brief Given a mergeable constant with the specified size and relocation
60 /// information, return a section that it should be placed in.
61 MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
62 const Constant *C) const override;
65 } // end namespace llvm