[SmallPtrSet] Remove SmallArray member (NFC) (#118099)
[llvm-project.git] / llvm / lib / Target / AArch64 / AArch64TargetObjectFile.h
blob2ef8bda2988d471bf0a69190da27de7e6e7dad44
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H
12 #include "Utils/AArch64BaseInfo.h"
13 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
14 #include "llvm/Target/TargetLoweringObjectFile.h"
16 namespace llvm {
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;
22 public:
23 AArch64_ELFTargetObjectFile() {
24 PLTRelativeVariantKind = MCSymbolRefExpr::VK_PLT;
25 SupportIndirectSymViaGOTPCRel = true;
28 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
29 const MCSymbol *Sym,
30 const MCValue &MV, int64_t Offset,
31 MachineModuleInfo *MMI,
32 MCStreamer &Streamer) const override;
34 MCSymbol *getAuthPtrSlotSymbol(const TargetMachine &TM,
35 MachineModuleInfo *MMI, const MCSymbol *RawSym,
36 AArch64PACKey::ID Key,
37 uint16_t Discriminator) const;
40 /// AArch64_MachoTargetObjectFile - This TLOF implementation is used for Darwin.
41 class AArch64_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
42 public:
43 AArch64_MachoTargetObjectFile();
45 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
46 unsigned Encoding,
47 const TargetMachine &TM,
48 MachineModuleInfo *MMI,
49 MCStreamer &Streamer) const override;
51 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
52 const TargetMachine &TM,
53 MachineModuleInfo *MMI) const override;
55 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
56 const MCSymbol *Sym,
57 const MCValue &MV, int64_t Offset,
58 MachineModuleInfo *MMI,
59 MCStreamer &Streamer) const override;
61 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
62 const TargetMachine &TM) const override;
64 MCSymbol *getAuthPtrSlotSymbol(const TargetMachine &TM,
65 MachineModuleInfo *MMI, const MCSymbol *RawSym,
66 AArch64PACKey::ID Key,
67 uint16_t Discriminator) const;
70 /// This implementation is used for AArch64 COFF targets.
71 class AArch64_COFFTargetObjectFile : public TargetLoweringObjectFileCOFF {};
73 } // end namespace llvm
75 #endif