[Alignment][NFC] Remove dependency on GlobalObject::setAlignment(unsigned)
[llvm-core.git] / include / llvm / IR / DebugInfoFlags.def
blobf90c580f10ef112ae8f9bbcdf4f50b7e14a341f4
1 //===- llvm/IR/DebugInfoFlags.def - Debug info flag definitions -*- 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 // Macros for running through debug info flags.
11 //===----------------------------------------------------------------------===//
13 #if !(defined HANDLE_DI_FLAG || defined HANDLE_DISP_FLAG)
14 #error "Missing macro definition of HANDLE_DI*"
15 #endif
17 #ifndef HANDLE_DI_FLAG
18 #define HANDLE_DI_FLAG(ID, NAME)
19 #endif
21 #ifndef HANDLE_DISP_FLAG
22 #define HANDLE_DISP_FLAG(ID, NAME)
23 #endif
25 // General flags kept in DINode.
27 HANDLE_DI_FLAG(0, Zero) // Use it as zero value.
28 // For example: void foo(DIFlags Flags = FlagZero).
29 HANDLE_DI_FLAG(1, Private)
30 HANDLE_DI_FLAG(2, Protected)
31 HANDLE_DI_FLAG(3, Public)
32 HANDLE_DI_FLAG((1 << 2), FwdDecl)
33 HANDLE_DI_FLAG((1 << 3), AppleBlock)
34 // Used to be BlockByRef, can be reused for anything except DICompositeType.
35 HANDLE_DI_FLAG((1 << 4), ReservedBit4)
36 HANDLE_DI_FLAG((1 << 5), Virtual)
37 HANDLE_DI_FLAG((1 << 6), Artificial)
38 HANDLE_DI_FLAG((1 << 7), Explicit)
39 HANDLE_DI_FLAG((1 << 8), Prototyped)
40 HANDLE_DI_FLAG((1 << 9), ObjcClassComplete)
41 HANDLE_DI_FLAG((1 << 10), ObjectPointer)
42 HANDLE_DI_FLAG((1 << 11), Vector)
43 HANDLE_DI_FLAG((1 << 12), StaticMember)
44 HANDLE_DI_FLAG((1 << 13), LValueReference)
45 HANDLE_DI_FLAG((1 << 14), RValueReference)
46 HANDLE_DI_FLAG((1 << 15), ExportSymbols)
47 HANDLE_DI_FLAG((1 << 16), SingleInheritance)
48 HANDLE_DI_FLAG((2 << 16), MultipleInheritance)
49 HANDLE_DI_FLAG((3 << 16), VirtualInheritance)
50 HANDLE_DI_FLAG((1 << 18), IntroducedVirtual)
51 HANDLE_DI_FLAG((1 << 19), BitField)
52 HANDLE_DI_FLAG((1 << 20), NoReturn)
53 HANDLE_DI_FLAG((1 << 21), ArgumentNotModified)
54 HANDLE_DI_FLAG((1 << 22), TypePassByValue)
55 HANDLE_DI_FLAG((1 << 23), TypePassByReference)
56 HANDLE_DI_FLAG((1 << 24), EnumClass)
57 HANDLE_DI_FLAG((1 << 25), Thunk)
58 HANDLE_DI_FLAG((1 << 26), NonTrivial)
59 HANDLE_DI_FLAG((1 << 27), BigEndian)
60 HANDLE_DI_FLAG((1 << 28), LittleEndian)
61 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed)
63 // To avoid needing a dedicated value for IndirectVirtualBase, we use
64 // the bitwise or of Virtual and FwdDecl, which does not otherwise
65 // make sense for inheritance.
66 HANDLE_DI_FLAG((1 << 2) | (1 << 5), IndirectVirtualBase)
68 #ifdef DI_FLAG_LARGEST_NEEDED
69 // intended to be used with ADT/BitmaskEnum.h
70 // NOTE: always must be equal to largest flag, check this when adding new flag
71 HANDLE_DI_FLAG((1 << 29), Largest)
72 #undef DI_FLAG_LARGEST_NEEDED
73 #endif
75 // Subprogram-specific flags kept in DISubprogram.
77 // Use this as a zero/initialization value.
78 // For example: void foo(DISPFlags Flags = SPFlagZero).
79 HANDLE_DISP_FLAG(0, Zero)
80 // Virtuality is a two-bit enum field in the LSB of the word.
81 // Values should match DW_VIRTUALITY_*.
82 HANDLE_DISP_FLAG(1u, Virtual)
83 HANDLE_DISP_FLAG(2u, PureVirtual)
84 HANDLE_DISP_FLAG((1u << 2), LocalToUnit)
85 HANDLE_DISP_FLAG((1u << 3), Definition)
86 HANDLE_DISP_FLAG((1u << 4), Optimized)
87 HANDLE_DISP_FLAG((1u << 5), Pure)
88 HANDLE_DISP_FLAG((1u << 6), Elemental)
89 HANDLE_DISP_FLAG((1u << 7), Recursive)
90 HANDLE_DISP_FLAG((1u << 8), MainSubprogram)
92 #ifdef DISP_FLAG_LARGEST_NEEDED
93 // Intended to be used with ADT/BitmaskEnum.h.
94 // NOTE: Always must be equal to largest flag, check this when adding new flags.
95 HANDLE_DISP_FLAG((1 << 8), Largest)
96 #undef DISP_FLAG_LARGEST_NEEDED
97 #endif
99 #undef HANDLE_DI_FLAG
100 #undef HANDLE_DISP_FLAG