MCDirectives.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //===- MCDirectives.h - Enums for directives on various targets -*- 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. // This file defines various enums that represent target-specific directives.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef LLVM_MC_MCDIRECTIVES_H
  13. #define LLVM_MC_MCDIRECTIVES_H
  14. namespace llvm {
  15. enum MCSymbolAttr {
  16. MCSA_Invalid = 0, ///< Not a valid directive.
  17. // Various directives in alphabetical order.
  18. MCSA_Cold, ///< .cold (MachO)
  19. MCSA_ELF_TypeFunction, ///< .type _foo, STT_FUNC # aka @function
  20. MCSA_ELF_TypeIndFunction, ///< .type _foo, STT_GNU_IFUNC
  21. MCSA_ELF_TypeObject, ///< .type _foo, STT_OBJECT # aka @object
  22. MCSA_ELF_TypeTLS, ///< .type _foo, STT_TLS # aka @tls_object
  23. MCSA_ELF_TypeCommon, ///< .type _foo, STT_COMMON # aka @common
  24. MCSA_ELF_TypeNoType, ///< .type _foo, STT_NOTYPE # aka @notype
  25. MCSA_ELF_TypeGnuUniqueObject, /// .type _foo, @gnu_unique_object
  26. MCSA_Global, ///< .globl
  27. MCSA_LGlobal, ///< .lglobl (XCOFF)
  28. MCSA_Extern, ///< .extern (XCOFF)
  29. MCSA_Hidden, ///< .hidden (ELF)
  30. MCSA_IndirectSymbol, ///< .indirect_symbol (MachO)
  31. MCSA_Internal, ///< .internal (ELF)
  32. MCSA_LazyReference, ///< .lazy_reference (MachO)
  33. MCSA_Local, ///< .local (ELF)
  34. MCSA_NoDeadStrip, ///< .no_dead_strip (MachO)
  35. MCSA_SymbolResolver, ///< .symbol_resolver (MachO)
  36. MCSA_AltEntry, ///< .alt_entry (MachO)
  37. MCSA_PrivateExtern, ///< .private_extern (MachO)
  38. MCSA_Protected, ///< .protected (ELF)
  39. MCSA_Reference, ///< .reference (MachO)
  40. MCSA_Weak, ///< .weak
  41. MCSA_WeakDefinition, ///< .weak_definition (MachO)
  42. MCSA_WeakReference, ///< .weak_reference (MachO)
  43. MCSA_WeakDefAutoPrivate ///< .weak_def_can_be_hidden (MachO)
  44. };
  45. enum MCAssemblerFlag {
  46. MCAF_SyntaxUnified, ///< .syntax (ARM/ELF)
  47. MCAF_SubsectionsViaSymbols, ///< .subsections_via_symbols (MachO)
  48. MCAF_Code16, ///< .code16 (X86) / .code 16 (ARM)
  49. MCAF_Code32, ///< .code32 (X86) / .code 32 (ARM)
  50. MCAF_Code64 ///< .code64 (X86)
  51. };
  52. enum MCDataRegionType {
  53. MCDR_DataRegion, ///< .data_region
  54. MCDR_DataRegionJT8, ///< .data_region jt8
  55. MCDR_DataRegionJT16, ///< .data_region jt16
  56. MCDR_DataRegionJT32, ///< .data_region jt32
  57. MCDR_DataRegionEnd ///< .end_data_region
  58. };
  59. enum MCVersionMinType {
  60. MCVM_IOSVersionMin, ///< .ios_version_min
  61. MCVM_OSXVersionMin, ///< .macosx_version_min
  62. MCVM_TvOSVersionMin, ///< .tvos_version_min
  63. MCVM_WatchOSVersionMin, ///< .watchos_version_min
  64. };
  65. } // end namespace llvm
  66. #endif