1 | //===--- DebugOptions.def - Debug option database ----------------- 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 debug-specific codegen options. Users of this file |
10 | // must define the CODEGENOPT macro to make use of this information. |
11 | // Optionally, the user may also define DEBUGOPT (for flags), ENUM_DEBUGOPT (for |
12 | // options that have enumeration type), and VALUE_DEBUGOPT (is a debug option |
13 | // that describes a value rather than a flag). |
14 | // |
15 | // BENIGN_ variants of the macros are used to describe options that do not |
16 | // affect the generated PCM. |
17 | // |
18 | //===----------------------------------------------------------------------===// |
19 | #ifndef DEBUGOPT |
20 | #define DEBUGOPT(Name, Bits, Default) \ |
21 | CODEGENOPT(Name, Bits, Default) |
22 | #endif |
23 | |
24 | #ifndef VALUE_DEBUGOPT |
25 | # define VALUE_DEBUGOPT(Name, Bits, Default) \ |
26 | VALUE_CODEGENOPT(Name, Bits, Default) |
27 | #endif |
28 | |
29 | #ifndef ENUM_DEBUGOPT |
30 | # define ENUM_DEBUGOPT(Name, Type, Bits, Default) \ |
31 | ENUM_CODEGENOPT(Name, Type, Bits, Default) |
32 | #endif |
33 | |
34 | #ifndef BENIGN_DEBUGOPT |
35 | #define BENIGN_DEBUGOPT(Name, Bits, Default) \ |
36 | DEBUGOPT(Name, Bits, Default) |
37 | #endif |
38 | |
39 | #ifndef BENIGN_VALUE_DEBUGOPT |
40 | # define BENIGN_VALUE_DEBUGOPT(Name, Bits, Default) \ |
41 | VALUE_DEBUGOPT(Name, Bits, Default) |
42 | #endif |
43 | |
44 | #ifndef BENIGN_ENUM_DEBUGOPT |
45 | # define BENIGN_ENUM_DEBUGOPT(Name, Type, Bits, Default) \ |
46 | ENUM_DEBUGOPT(Name, Type, Bits, Default) |
47 | #endif |
48 | |
49 | BENIGN_ENUM_DEBUGOPT(CompressDebugSections, llvm::DebugCompressionType, 2, |
50 | llvm::DebugCompressionType::None) |
51 | DEBUGOPT(Dwarf64, 1, 0) ///< -gdwarf64. |
52 | BENIGN_DEBUGOPT(EnableDIPreservationVerify, 1, 0) ///< Enable di preservation |
53 | ///< verify each (it means |
54 | ///< check the original debug |
55 | ///< info metadata |
56 | ///< preservation). |
57 | BENIGN_DEBUGOPT(ForceDwarfFrameSection , 1, 0) ///< Set when -fforce-dwarf-frame |
58 | ///< is enabled. |
59 | |
60 | ///< Set when -femit-dwarf-unwind is passed. |
61 | BENIGN_ENUM_DEBUGOPT(EmitDwarfUnwind, llvm::EmitDwarfUnwindType, 2, |
62 | llvm::EmitDwarfUnwindType::Default) |
63 | |
64 | BENIGN_DEBUGOPT(NoDwarfDirectoryAsm , 1, 0) ///< Set when -fno-dwarf-directory-asm |
65 | ///< is enabled. |
66 | |
67 | BENIGN_DEBUGOPT(NoInlineLineTables, 1, 0) ///< Whether debug info should contain |
68 | ///< inline line tables. |
69 | |
70 | DEBUGOPT(DebugStrictDwarf, 1, 1) ///< Whether or not to use strict DWARF info. |
71 | |
72 | /// Control the Assignment Tracking debug info feature. |
73 | BENIGN_ENUM_DEBUGOPT(AssignmentTrackingMode, AssignmentTrackingOpts, 2, |
74 | AssignmentTrackingOpts::Disabled) |
75 | |
76 | DEBUGOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information |
77 | ///< in debug info. |
78 | |
79 | DEBUGOPT(DebugTypeExtRefs, 1, 0) ///< Whether or not debug info should contain |
80 | ///< external references to a PCH or module. |
81 | |
82 | DEBUGOPT(DebugExplicitImport, 1, 0) ///< Whether or not debug info should |
83 | ///< contain explicit imports for |
84 | ///< anonymous namespaces |
85 | |
86 | /// Set debug info source file hashing algorithm. |
87 | ENUM_DEBUGOPT(DebugSrcHash, DebugSrcHashKind, 2, DSH_MD5) |
88 | |
89 | DEBUGOPT(SplitDwarfInlining, 1, 1) ///< Whether to include inlining info in the |
90 | ///< skeleton CU to allow for symbolication |
91 | ///< of inline stack frames without .dwo files. |
92 | DEBUGOPT(DebugFwdTemplateParams, 1, 0) ///< Whether to emit complete |
93 | ///< template parameter descriptions in |
94 | ///< forward declarations (versus just |
95 | ///< including them in the name). |
96 | ENUM_DEBUGOPT(DebugSimpleTemplateNames, |
97 | llvm::codegenoptions::DebugTemplateNamesKind, 2, |
98 | llvm::codegenoptions::DebugTemplateNamesKind::Full) |
99 | ///< Whether to emit template parameters in the textual names of |
100 | ///< template specializations. |
101 | ///< Implies DebugFwdTemplateNames to allow decorated names to be |
102 | ///< reconstructed when needed. |
103 | |
104 | /// The kind of generated debug info. |
105 | ENUM_DEBUGOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, |
106 | llvm::codegenoptions::NoDebugInfo) |
107 | |
108 | /// Whether to generate macro debug info. |
109 | DEBUGOPT(MacroDebugInfo, 1, 0) |
110 | |
111 | /// Tune the debug info for this debugger. |
112 | ENUM_DEBUGOPT(DebuggerTuning, llvm::DebuggerKind, 3, |
113 | llvm::DebuggerKind::Default) |
114 | |
115 | /// Dwarf version. Version zero indicates to LLVM that no DWARF should be |
116 | /// emitted. |
117 | VALUE_DEBUGOPT(DwarfVersion, 3, 0) |
118 | |
119 | /// Whether we should emit CodeView debug information. It's possible to emit |
120 | /// CodeView and DWARF into the same object. |
121 | DEBUGOPT(EmitCodeView, 1, 0) |
122 | |
123 | /// Whether to emit the .debug$H section containing hashes of CodeView types. |
124 | DEBUGOPT(CodeViewGHash, 1, 0) |
125 | |
126 | /// Whether to emit the compiler path and command line into the CodeView debug information. |
127 | DEBUGOPT(CodeViewCommandLine, 1, 0) |
128 | |
129 | /// Whether emit extra debug info for sample pgo profile collection. |
130 | DEBUGOPT(DebugInfoForProfiling, 1, 0) |
131 | |
132 | /// Whether to emit .debug_gnu_pubnames section instead of .debug_pubnames. |
133 | DEBUGOPT(DebugNameTable, 2, 0) |
134 | |
135 | /// Whether to use DWARF base address specifiers in .debug_ranges. |
136 | DEBUGOPT(DebugRangesBaseAddress, 1, 0) |
137 | |
138 | /// Whether to embed source in DWARF debug line section. |
139 | DEBUGOPT(EmbedSource, 1, 0) |
140 | |
141 | #undef DEBUGOPT |
142 | #undef ENUM_DEBUGOPT |
143 | #undef VALUE_DEBUGOPT |
144 | #undef BENIGN_DEBUGOPT |
145 | #undef BENIGN_ENUM_DEBUGOPT |
146 | #undef BENIGN_VALUE_DEBUGOPT |
147 | |