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 17 /// This implementation is used for AArch64 ELF targets (Linux in particular). 18 class AArch64_ELFTargetObjectFile : public TargetLoweringObjectFileELF { 19 void Initialize(MCContext &Ctx, const TargetMachine &TM) override; 20 21 public: 22 AArch64_ELFTargetObjectFile() { 23 PLTRelativeVariantKind = MCSymbolRefExpr::VK_PLT; 24 } 25 }; 26 27 /// AArch64_MachoTargetObjectFile - This TLOF implementation is used for Darwin. 28 class AArch64_MachoTargetObjectFile : public TargetLoweringObjectFileMachO { 29 public: 30 AArch64_MachoTargetObjectFile(); 31 32 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, 33 unsigned Encoding, 34 const TargetMachine &TM, 35 MachineModuleInfo *MMI, 36 MCStreamer &Streamer) const override; 37 38 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, 39 const TargetMachine &TM, 40 MachineModuleInfo *MMI) const override; 41 42 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV, 43 const MCSymbol *Sym, 44 const MCValue &MV, int64_t Offset, 45 MachineModuleInfo *MMI, 46 MCStreamer &Streamer) const override; 47 48 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV, 49 const TargetMachine &TM) const override; 50 }; 51 52 /// This implementation is used for AArch64 COFF targets. 53 class AArch64_COFFTargetObjectFile : public TargetLoweringObjectFileCOFF {}; 54 55 } // end namespace llvm 56 57 #endif 58