1 //===- llvm
/IR
/DebugInfoFlags.def
- Debug info flag definitions
-*- C
++ -*-===//
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
7 //===----------------------------------------------------------------------===//
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*"
17 #ifndef HANDLE_DI_FLAG
18 #define
HANDLE_DI_FLAG(ID
, NAME
)
21 #ifndef HANDLE_DISP_FLAG
22 #define
HANDLE_DISP_FLAG(ID
, NAME
)
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 HANDLE_DI_FLAG((1 << 4), BlockByrefStruct
)
35 HANDLE_DI_FLAG((1 << 5), Virtual
)
36 HANDLE_DI_FLAG((1 << 6), Artificial
)
37 HANDLE_DI_FLAG((1 << 7), Explicit
)
38 HANDLE_DI_FLAG((1 << 8), Prototyped
)
39 HANDLE_DI_FLAG((1 << 9), ObjcClassComplete
)
40 HANDLE_DI_FLAG((1 << 10), ObjectPointer
)
41 HANDLE_DI_FLAG((1 << 11), Vector
)
42 HANDLE_DI_FLAG((1 << 12), StaticMember
)
43 HANDLE_DI_FLAG((1 << 13), LValueReference
)
44 HANDLE_DI_FLAG((1 << 14), RValueReference
)
45 HANDLE_DI_FLAG((1 << 15), ExportSymbols
)
46 HANDLE_DI_FLAG((1 << 16), SingleInheritance
)
47 HANDLE_DI_FLAG((2 << 16), MultipleInheritance
)
48 HANDLE_DI_FLAG((3 << 16), VirtualInheritance
)
49 HANDLE_DI_FLAG((1 << 18), IntroducedVirtual
)
50 HANDLE_DI_FLAG((1 << 19), BitField
)
51 HANDLE_DI_FLAG((1 << 20), NoReturn
)
52 HANDLE_DI_FLAG((1 << 21), ArgumentNotModified
)
53 HANDLE_DI_FLAG((1 << 22), TypePassByValue
)
54 HANDLE_DI_FLAG((1 << 23), TypePassByReference
)
55 HANDLE_DI_FLAG((1 << 24), EnumClass
)
56 HANDLE_DI_FLAG((1 << 25), Thunk
)
57 HANDLE_DI_FLAG((1 << 26), NonTrivial
)
58 HANDLE_DI_FLAG((1 << 27), BigEndian
)
59 HANDLE_DI_FLAG((1 << 28), LittleEndian
)
60 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed
)
62 // To avoid needing a dedicated value for IndirectVirtualBase
, we use
63 // the bitwise or of Virtual and FwdDecl
, which does not otherwise
64 // make sense for inheritance.
65 HANDLE_DI_FLAG((1 << 2) |
(1 << 5), IndirectVirtualBase
)
67 #ifdef DI_FLAG_LARGEST_NEEDED
68 // intended to be used with ADT
/BitmaskEnum.h
69 // NOTE
: always must be equal to largest flag
, check this when adding new flag
70 HANDLE_DI_FLAG((1 << 29), Largest
)
71 #undef DI_FLAG_LARGEST_NEEDED
74 // Subprogram
-specific flags kept in DISubprogram.
76 // Use this as a zero
/initialization value.
77 // For example
: void
foo(DISPFlags Flags
= SPFlagZero
).
78 HANDLE_DISP_FLAG(0, Zero
)
79 // Virtuality is a two
-bit enum field in the LSB of the word.
80 // Values should match DW_VIRTUALITY_
*.
81 HANDLE_DISP_FLAG(1u, Virtual
)
82 HANDLE_DISP_FLAG(2u, PureVirtual
)
83 HANDLE_DISP_FLAG((1u << 2), LocalToUnit
)
84 HANDLE_DISP_FLAG((1u << 3), Definition
)
85 HANDLE_DISP_FLAG((1u << 4), Optimized
)
86 HANDLE_DISP_FLAG((1u << 5), Pure
)
87 HANDLE_DISP_FLAG((1u << 6), Elemental
)
88 HANDLE_DISP_FLAG((1u << 7), Recursive
)
89 HANDLE_DISP_FLAG((1u << 8), MainSubprogram
)
91 #ifdef DISP_FLAG_LARGEST_NEEDED
92 // Intended to be used with ADT
/BitmaskEnum.h.
93 // NOTE
: Always must be equal to largest flag
, check this when adding new flags.
94 HANDLE_DISP_FLAG((1 << 8), Largest
)
95 #undef DISP_FLAG_LARGEST_NEEDED
99 #undef HANDLE_DISP_FLAG