X86TargetObjectFile.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //===-- X86TargetObjectFile.h - X86 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_X86_X86TARGETOBJECTFILE_H
  9. #define LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
  10. #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
  11. namespace llvm {
  12. /// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
  13. /// x86-64.
  14. class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
  15. public:
  16. const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
  17. unsigned Encoding,
  18. const TargetMachine &TM,
  19. MachineModuleInfo *MMI,
  20. MCStreamer &Streamer) const override;
  21. // getCFIPersonalitySymbol - The symbol that gets passed to
  22. // .cfi_personality.
  23. MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
  24. const TargetMachine &TM,
  25. MachineModuleInfo *MMI) const override;
  26. const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
  27. const MCSymbol *Sym,
  28. const MCValue &MV, int64_t Offset,
  29. MachineModuleInfo *MMI,
  30. MCStreamer &Streamer) const override;
  31. };
  32. /// This implementation is used for X86 ELF targets that don't
  33. /// have a further specialization.
  34. class X86ELFTargetObjectFile : public TargetLoweringObjectFileELF {
  35. public:
  36. X86ELFTargetObjectFile() {
  37. PLTRelativeVariantKind = MCSymbolRefExpr::VK_PLT;
  38. }
  39. /// Describe a TLS variable address within debug info.
  40. const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
  41. };
  42. } // end namespace llvm
  43. #endif