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 /// \brief This implemenatation is used for X86 ELF targets that don't
42 /// have a further specialization.
43 class X86ELFTargetObjectFile : public TargetLoweringObjectFileELF {
44 /// \brief Describe a TLS variable address within debug info.
45 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
48 /// X86LinuxTargetObjectFile - This implementation is used for linux x86
50 class X86LinuxTargetObjectFile : public X86ELFTargetObjectFile {
51 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
54 /// \brief This implementation is used for Windows targets on x86 and x86-64.
55 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
57 getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
58 const TargetMachine &TM) const override;
60 /// \brief Given a mergeable constant with the specified size and relocation
61 /// information, return a section that it should be placed in.
62 const MCSection *getSectionForConstant(SectionKind Kind,
63 const Constant *C) const override;
66 } // end namespace llvm