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) \
21CODEGENOPT(Name, Bits, Default)
22#endif
23
24#ifndef VALUE_DEBUGOPT
25# define VALUE_DEBUGOPT(Name, Bits, Default) \
26VALUE_CODEGENOPT(Name, Bits, Default)
27#endif
28
29#ifndef ENUM_DEBUGOPT
30# define ENUM_DEBUGOPT(Name, Type, Bits, Default) \
31ENUM_CODEGENOPT(Name, Type, Bits, Default)
32#endif
33
34#ifndef BENIGN_DEBUGOPT
35#define BENIGN_DEBUGOPT(Name, Bits, Default) \
36DEBUGOPT(Name, Bits, Default)
37#endif
38
39#ifndef BENIGN_VALUE_DEBUGOPT
40# define BENIGN_VALUE_DEBUGOPT(Name, Bits, Default) \
41VALUE_DEBUGOPT(Name, Bits, Default)
42#endif
43
44#ifndef BENIGN_ENUM_DEBUGOPT
45# define BENIGN_ENUM_DEBUGOPT(Name, Type, Bits, Default) \
46ENUM_DEBUGOPT(Name, Type, Bits, Default)
47#endif
48
49BENIGN_ENUM_DEBUGOPT(CompressDebugSections, llvm::DebugCompressionType, 2,
50 llvm::DebugCompressionType::None)
51DEBUGOPT(Dwarf64, 1, 0) ///< -gdwarf64.
52BENIGN_DEBUGOPT(EnableDIPreservationVerify, 1, 0) ///< Enable di preservation
53 ///< verify each (it means
54 ///< check the original debug
55 ///< info metadata
56 ///< preservation).
57BENIGN_DEBUGOPT(ForceDwarfFrameSection , 1, 0) ///< Set when -fforce-dwarf-frame
58 ///< is enabled.
59
60///< Set when -femit-dwarf-unwind is passed.
61BENIGN_ENUM_DEBUGOPT(EmitDwarfUnwind, llvm::EmitDwarfUnwindType, 2,
62 llvm::EmitDwarfUnwindType::Default)
63
64BENIGN_DEBUGOPT(NoDwarfDirectoryAsm , 1, 0) ///< Set when -fno-dwarf-directory-asm
65 ///< is enabled.
66
67BENIGN_DEBUGOPT(NoInlineLineTables, 1, 0) ///< Whether debug info should contain
68 ///< inline line tables.
69
70DEBUGOPT(DebugStrictDwarf, 1, 1) ///< Whether or not to use strict DWARF info.
71
72/// Control the Assignment Tracking debug info feature.
73BENIGN_ENUM_DEBUGOPT(AssignmentTrackingMode, AssignmentTrackingOpts, 2,
74 AssignmentTrackingOpts::Disabled)
75
76DEBUGOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information
77 ///< in debug info.
78
79DEBUGOPT(DebugTypeExtRefs, 1, 0) ///< Whether or not debug info should contain
80 ///< external references to a PCH or module.
81
82DEBUGOPT(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.
87ENUM_DEBUGOPT(DebugSrcHash, DebugSrcHashKind, 2, DSH_MD5)
88
89DEBUGOPT(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.
92DEBUGOPT(DebugFwdTemplateParams, 1, 0) ///< Whether to emit complete
93 ///< template parameter descriptions in
94 ///< forward declarations (versus just
95 ///< including them in the name).
96ENUM_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.
105ENUM_DEBUGOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4,
106 llvm::codegenoptions::NoDebugInfo)
107
108/// Whether to generate macro debug info.
109DEBUGOPT(MacroDebugInfo, 1, 0)
110
111/// Tune the debug info for this debugger.
112ENUM_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.
117VALUE_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.
121DEBUGOPT(EmitCodeView, 1, 0)
122
123/// Whether to emit the .debug$H section containing hashes of CodeView types.
124DEBUGOPT(CodeViewGHash, 1, 0)
125
126/// Whether to emit the compiler path and command line into the CodeView debug information.
127DEBUGOPT(CodeViewCommandLine, 1, 0)
128
129/// Whether emit extra debug info for sample pgo profile collection.
130DEBUGOPT(DebugInfoForProfiling, 1, 0)
131
132/// Whether to emit .debug_gnu_pubnames section instead of .debug_pubnames.
133DEBUGOPT(DebugNameTable, 2, 0)
134
135/// Whether to use DWARF base address specifiers in .debug_ranges.
136DEBUGOPT(DebugRangesBaseAddress, 1, 0)
137
138/// Whether to embed source in DWARF debug line section.
139DEBUGOPT(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

source code of clang/include/clang/Basic/DebugOptions.def