MCDirectives.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- MCDirectives.h - Enums for directives on various targets -*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file defines various enums that represent target-specific directives.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_MC_MCDIRECTIVES_H
  18. #define LLVM_MC_MCDIRECTIVES_H
  19. namespace llvm {
  20. enum MCSymbolAttr {
  21. MCSA_Invalid = 0, ///< Not a valid directive.
  22. // Various directives in alphabetical order.
  23. MCSA_Cold, ///< .cold (MachO)
  24. MCSA_ELF_TypeFunction, ///< .type _foo, STT_FUNC # aka @function
  25. MCSA_ELF_TypeIndFunction, ///< .type _foo, STT_GNU_IFUNC
  26. MCSA_ELF_TypeObject, ///< .type _foo, STT_OBJECT # aka @object
  27. MCSA_ELF_TypeTLS, ///< .type _foo, STT_TLS # aka @tls_object
  28. MCSA_ELF_TypeCommon, ///< .type _foo, STT_COMMON # aka @common
  29. MCSA_ELF_TypeNoType, ///< .type _foo, STT_NOTYPE # aka @notype
  30. MCSA_ELF_TypeGnuUniqueObject, /// .type _foo, @gnu_unique_object
  31. MCSA_Global, ///< .globl
  32. MCSA_LGlobal, ///< .lglobl (XCOFF)
  33. MCSA_Extern, ///< .extern (XCOFF)
  34. MCSA_Hidden, ///< .hidden (ELF)
  35. MCSA_Exported, ///< .globl _foo, exported (XCOFF)
  36. MCSA_IndirectSymbol, ///< .indirect_symbol (MachO)
  37. MCSA_Internal, ///< .internal (ELF)
  38. MCSA_LazyReference, ///< .lazy_reference (MachO)
  39. MCSA_Local, ///< .local (ELF)
  40. MCSA_NoDeadStrip, ///< .no_dead_strip (MachO)
  41. MCSA_SymbolResolver, ///< .symbol_resolver (MachO)
  42. MCSA_AltEntry, ///< .alt_entry (MachO)
  43. MCSA_PrivateExtern, ///< .private_extern (MachO)
  44. MCSA_Protected, ///< .protected (ELF)
  45. MCSA_Reference, ///< .reference (MachO)
  46. MCSA_Weak, ///< .weak
  47. MCSA_WeakDefinition, ///< .weak_definition (MachO)
  48. MCSA_WeakReference, ///< .weak_reference (MachO)
  49. MCSA_WeakDefAutoPrivate, ///< .weak_def_can_be_hidden (MachO)
  50. MCSA_Memtag, ///< .memtag (ELF)
  51. };
  52. enum MCAssemblerFlag {
  53. MCAF_SyntaxUnified, ///< .syntax (ARM/ELF)
  54. MCAF_SubsectionsViaSymbols, ///< .subsections_via_symbols (MachO)
  55. MCAF_Code16, ///< .code16 (X86) / .code 16 (ARM)
  56. MCAF_Code32, ///< .code32 (X86) / .code 32 (ARM)
  57. MCAF_Code64 ///< .code64 (X86)
  58. };
  59. enum MCDataRegionType {
  60. MCDR_DataRegion, ///< .data_region
  61. MCDR_DataRegionJT8, ///< .data_region jt8
  62. MCDR_DataRegionJT16, ///< .data_region jt16
  63. MCDR_DataRegionJT32, ///< .data_region jt32
  64. MCDR_DataRegionEnd ///< .end_data_region
  65. };
  66. enum MCVersionMinType {
  67. MCVM_IOSVersionMin, ///< .ios_version_min
  68. MCVM_OSXVersionMin, ///< .macosx_version_min
  69. MCVM_TvOSVersionMin, ///< .tvos_version_min
  70. MCVM_WatchOSVersionMin, ///< .watchos_version_min
  71. };
  72. } // end namespace llvm
  73. #endif
  74. #ifdef __GNUC__
  75. #pragma GCC diagnostic pop
  76. #endif