xref: /freebsd/contrib/llvm-project/llvm/lib/Target/X86/X86TargetObjectFile.h (revision 6be3386466ab79a84b48429ae66244f21526d3df)
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 
14 namespace llvm {
15 
16   /// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
17   /// x86-64.
18   class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
19   public:
20     const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
21                                           unsigned Encoding,
22                                           const TargetMachine &TM,
23                                           MachineModuleInfo *MMI,
24                                           MCStreamer &Streamer) const override;
25 
26     // getCFIPersonalitySymbol - The symbol that gets passed to
27     // .cfi_personality.
28     MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
29                                       const TargetMachine &TM,
30                                       MachineModuleInfo *MMI) const override;
31 
32     const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
33                                             const MCSymbol *Sym,
34                                             const MCValue &MV, int64_t Offset,
35                                             MachineModuleInfo *MMI,
36                                             MCStreamer &Streamer) const override;
37   };
38 
39   /// This implemenatation is used for X86 ELF targets that don't
40   /// have a further specialization.
41   class X86ELFTargetObjectFile : public TargetLoweringObjectFileELF {
42   public:
43     X86ELFTargetObjectFile() {
44       PLTRelativeVariantKind = MCSymbolRefExpr::VK_PLT;
45     }
46     /// Describe a TLS variable address within debug info.
47     const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
48   };
49 
50 } // end namespace llvm
51 
52 #endif
53