1 //===-- AArch64TargetObjectFile.h - AArch64 Object Info -*- C++ ---------*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H
10 #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
13 #include "llvm/Target/TargetLoweringObjectFile.h"
16 class AArch64TargetMachine;
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;
23 AArch64_ELFTargetObjectFile() {
24 PLTRelativeVariantKind = MCSymbolRefExpr::VK_PLT;
28 /// AArch64_MachoTargetObjectFile - This TLOF implementation is used for Darwin.
29 class AArch64_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
31 AArch64_MachoTargetObjectFile();
33 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
35 const TargetMachine &TM,
36 MachineModuleInfo *MMI,
37 MCStreamer &Streamer) const override;
39 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
40 const TargetMachine &TM,
41 MachineModuleInfo *MMI) const override;
43 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
45 const MCValue &MV, int64_t Offset,
46 MachineModuleInfo *MMI,
47 MCStreamer &Streamer) const override;
49 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
50 const TargetMachine &TM) const override;
53 /// This implementation is used for AArch64 COFF targets.
54 class AArch64_COFFTargetObjectFile : public TargetLoweringObjectFileCOFF {};
56 } // end namespace llvm