1 //===-- X86TargetObjectFile.h - X86 Object Info -----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
11 
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
13 #include "llvm/Target/TargetLoweringObjectFile.h"
14 
15 namespace llvm {
16 
17   /// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
18   /// x86-64.
19   class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
20   public:
21     const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
22                                           unsigned Encoding,
23                                           const TargetMachine &TM,
24                                           MachineModuleInfo *MMI,
25                                           MCStreamer &Streamer) const override;
26 
27     // getCFIPersonalitySymbol - The symbol that gets passed to
28     // .cfi_personality.
29     MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
30                                       const TargetMachine &TM,
31                                       MachineModuleInfo *MMI) const override;
32 
33     const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
34                                             const MCSymbol *Sym,
35                                             const MCValue &MV, int64_t Offset,
36                                             MachineModuleInfo *MMI,
37                                             MCStreamer &Streamer) const override;
38   };
39 
40   /// This implemenatation is used for X86 ELF targets that don't
41   /// have a further specialization.
42   class X86ELFTargetObjectFile : public TargetLoweringObjectFileELF {
43   public:
44     X86ELFTargetObjectFile() {
45       PLTRelativeVariantKind = MCSymbolRefExpr::VK_PLT;
46     }
47     /// Describe a TLS variable address within debug info.
48     const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
49   };
50 
51 } // end namespace llvm
52 
53 #endif
54