xref: /freebsd/contrib/llvm-project/llvm/include/llvm/MC/MCDirectives.h (revision 700637cbb5e582861067a11aaca4d053546871d2)
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 
13 #ifndef LLVM_MC_MCDIRECTIVES_H
14 #define LLVM_MC_MCDIRECTIVES_H
15 
16 namespace llvm {
17 
18 enum MCSymbolAttr {
19   MCSA_Invalid = 0, ///< Not a valid directive.
20 
21   // Various directives in alphabetical order.
22   MCSA_Cold,                    ///< .cold (MachO)
23   MCSA_ELF_TypeFunction,        ///< .type _foo, STT_FUNC  # aka @function
24   MCSA_ELF_TypeIndFunction,     ///< .type _foo, STT_GNU_IFUNC
25   MCSA_ELF_TypeObject,          ///< .type _foo, STT_OBJECT  # aka @object
26   MCSA_ELF_TypeTLS,             ///< .type _foo, STT_TLS     # aka @tls_object
27   MCSA_ELF_TypeCommon,          ///< .type _foo, STT_COMMON  # aka @common
28   MCSA_ELF_TypeNoType,          ///< .type _foo, STT_NOTYPE  # aka @notype
29   MCSA_ELF_TypeGnuUniqueObject, /// .type _foo, @gnu_unique_object
30   MCSA_Global,                  ///< .globl
31   MCSA_LGlobal,                 ///< .lglobl (XCOFF)
32   MCSA_Extern,                  ///< .extern (XCOFF)
33   MCSA_Hidden,                  ///< .hidden (ELF)
34   MCSA_Exported,                ///< .globl _foo, exported (XCOFF)
35   MCSA_IndirectSymbol,          ///< .indirect_symbol (MachO)
36   MCSA_Internal,                ///< .internal (ELF)
37   MCSA_LazyReference,           ///< .lazy_reference (MachO)
38   MCSA_Local,                   ///< .local (ELF)
39   MCSA_NoDeadStrip,             ///< .no_dead_strip (MachO)
40   MCSA_SymbolResolver,          ///< .symbol_resolver (MachO)
41   MCSA_AltEntry,                ///< .alt_entry (MachO)
42   MCSA_PrivateExtern,           ///< .private_extern (MachO)
43   MCSA_Protected,               ///< .protected (ELF)
44   MCSA_Reference,               ///< .reference (MachO)
45   MCSA_Weak,                    ///< .weak
46   MCSA_WeakDefinition,          ///< .weak_definition (MachO)
47   MCSA_WeakReference,           ///< .weak_reference (MachO)
48   MCSA_WeakDefAutoPrivate,      ///< .weak_def_can_be_hidden (MachO)
49   MCSA_WeakAntiDep,             ///< .weak_anti_dep (COFF)
50   MCSA_Memtag,                  ///< .memtag (ELF)
51 };
52 
53 enum MCDataRegionType {
54   MCDR_DataRegion,            ///< .data_region
55   MCDR_DataRegionJT8,         ///< .data_region jt8
56   MCDR_DataRegionJT16,        ///< .data_region jt16
57   MCDR_DataRegionJT32,        ///< .data_region jt32
58   MCDR_DataRegionEnd          ///< .end_data_region
59 };
60 
61 enum MCVersionMinType {
62   MCVM_IOSVersionMin,         ///< .ios_version_min
63   MCVM_OSXVersionMin,         ///< .macosx_version_min
64   MCVM_TvOSVersionMin,        ///< .tvos_version_min
65   MCVM_WatchOSVersionMin,     ///< .watchos_version_min
66 };
67 
68 } // end namespace llvm
69 
70 #endif
71