xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetObjectFile.h (revision 8bcb0991864975618c09697b1aca10683346d9f0)
10b57cec5SDimitry Andric //===-- AArch64TargetObjectFile.h - AArch64 Object Info -*- C++ ---------*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H
100b57cec5SDimitry Andric #define LLVM_LIB_TARGET_AARCH64_AARCH64TARGETOBJECTFILE_H
110b57cec5SDimitry Andric 
120b57cec5SDimitry Andric #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
130b57cec5SDimitry Andric #include "llvm/Target/TargetLoweringObjectFile.h"
140b57cec5SDimitry Andric 
150b57cec5SDimitry Andric namespace llvm {
160b57cec5SDimitry Andric class AArch64TargetMachine;
170b57cec5SDimitry Andric 
180b57cec5SDimitry Andric /// This implementation is used for AArch64 ELF targets (Linux in particular).
190b57cec5SDimitry Andric class AArch64_ELFTargetObjectFile : public TargetLoweringObjectFileELF {
200b57cec5SDimitry Andric   void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
210b57cec5SDimitry Andric };
220b57cec5SDimitry Andric 
230b57cec5SDimitry Andric /// AArch64_MachoTargetObjectFile - This TLOF implementation is used for Darwin.
240b57cec5SDimitry Andric class AArch64_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
250b57cec5SDimitry Andric public:
260b57cec5SDimitry Andric   AArch64_MachoTargetObjectFile();
270b57cec5SDimitry Andric 
280b57cec5SDimitry Andric   const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
290b57cec5SDimitry Andric                                         unsigned Encoding,
300b57cec5SDimitry Andric                                         const TargetMachine &TM,
310b57cec5SDimitry Andric                                         MachineModuleInfo *MMI,
320b57cec5SDimitry Andric                                         MCStreamer &Streamer) const override;
330b57cec5SDimitry Andric 
340b57cec5SDimitry Andric   MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
350b57cec5SDimitry Andric                                     const TargetMachine &TM,
360b57cec5SDimitry Andric                                     MachineModuleInfo *MMI) const override;
370b57cec5SDimitry Andric 
38*8bcb0991SDimitry Andric   const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
39*8bcb0991SDimitry Andric                                           const MCSymbol *Sym,
400b57cec5SDimitry Andric                                           const MCValue &MV, int64_t Offset,
410b57cec5SDimitry Andric                                           MachineModuleInfo *MMI,
420b57cec5SDimitry Andric                                           MCStreamer &Streamer) const override;
430b57cec5SDimitry Andric 
440b57cec5SDimitry Andric   void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
450b57cec5SDimitry Andric                          const TargetMachine &TM) const override;
460b57cec5SDimitry Andric };
470b57cec5SDimitry Andric 
480b57cec5SDimitry Andric /// This implementation is used for AArch64 COFF targets.
490b57cec5SDimitry Andric class AArch64_COFFTargetObjectFile : public TargetLoweringObjectFileCOFF {};
500b57cec5SDimitry Andric 
510b57cec5SDimitry Andric } // end namespace llvm
520b57cec5SDimitry Andric 
530b57cec5SDimitry Andric #endif
54