AArch64TargetObjectFile.h 2.3 KB

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