AArch64TargetObjectFile.h 2.3 KB

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