xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h (revision e40139ff33b48b56a24c808b166b04b8ee6f5b21)
1 //===-- AArch64TargetObjectFile.h - AArch64 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_AARCH64_AARCH64TARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H
11 
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
13 #include "llvm/Target/TargetLoweringObjectFile.h"
14 
15 namespace llvm {
16 class AArch64TargetMachine;
17 
18 /// This implementation is used for AArch64 ELF targets (Linux in particular).
19 class AArch64_ELFTargetObjectFile : public TargetLoweringObjectFileELF {
20   void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
21 };
22 
23 /// AArch64_MachoTargetObjectFile - This TLOF implementation is used for Darwin.
24 class AArch64_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
25 public:
26   AArch64_MachoTargetObjectFile();
27 
28   const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
29                                         unsigned Encoding,
30                                         const TargetMachine &TM,
31                                         MachineModuleInfo *MMI,
32                                         MCStreamer &Streamer) const override;
33 
34   MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
35                                     const TargetMachine &TM,
36                                     MachineModuleInfo *MMI) const override;
37 
38   const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
39                                           const MCSymbol *Sym,
40                                           const MCValue &MV, int64_t Offset,
41                                           MachineModuleInfo *MMI,
42                                           MCStreamer &Streamer) const override;
43 
44   void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
45                          const TargetMachine &TM) const override;
46 };
47 
48 /// This implementation is used for AArch64 COFF targets.
49 class AArch64_COFFTargetObjectFile : public TargetLoweringObjectFileCOFF {};
50 
51 } // end namespace llvm
52 
53 #endif
54