llvm.org GIT mirror llvm / dc666ea
Clean up comments in include/llvm-c/DebugInfo.h Patch by Harlan Haskins! Differential Revision: https://reviews.llvm.org/D39568 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317271 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian Prantl 1 year, 10 months ago
1 changed file(s) with 84 addition(s) and 59 deletion(s). Raw diff Collapse all Expand all
2222 extern "C" {
2323 #endif
2424
25 /// Debug info flags.
25 /**
26 * Debug info flags.
27 */
2628 typedef enum {
2729 LLVMDIFlagZero = 0,
2830 LLVMDIFlagPrivate = 1,
5759 LLVMDIFlagVirtualInheritance
5860 } LLVMDIFlags;
5961
60 /// Source languages known by DWARF.
62 /**
63 * Source languages known by DWARF.
64 */
6165 typedef enum {
6266 LLVMDWARFSourceLanguageC89,
6367 LLVMDWARFSourceLanguageC,
105109 LLVMDWARFSourceLanguageBORLAND_Delphi
106110 } LLVMDWARFSourceLanguage;
107111
108 /// The amount of debug information to emit.
112 /**
113 * The amount of debug information to emit.
114 */
109115 typedef enum {
110116 LLVMDWARFEmissionNone = 0,
111117 LLVMDWARFEmissionFull,
112118 LLVMDWARFEmissionLineTablesOnly
113119 } LLVMDWARFEmissionKind;
114120
115 /// The current debug metadata version number.
121 /**
122 * The current debug metadata version number.
123 */
116124 unsigned LLVMDebugMetadataVersion(void);
117125
118 /// The version of debug metadata that's present in the provided \c Module.
126 /**
127 * The version of debug metadata that's present in the provided \c Module.
128 */
119129 unsigned LLVMGetModuleDebugMetadataVersion(LLVMModuleRef Module);
120130
121 /// Strip debug info in the module if it exists.
122 ///
123 /// To do this, we remove all calls to the debugger intrinsics and any named
124 /// metadata for debugging. We also remove debug locations for instructions.
125 /// Return true if module is modified.
131 /**
132 * Strip debug info in the module if it exists.
133 * To do this, we remove all calls to the debugger intrinsics and any named
134 * metadata for debugging. We also remove debug locations for instructions.
135 * Return true if module is modified.
136 */
126137 LLVMBool LLVMStripModuleDebugInfo(LLVMModuleRef Module);
127138
128 /// Construct a builder for a module, and do not allow for unresolved nodes
129 /// attached to the module.
139 /**
140 * Construct a builder for a module, and do not allow for unresolved nodes
141 * attached to the module.
142 */
130143 LLVMDIBuilderRef LLVMCreateDIBuilderDisallowUnresolved(LLVMModuleRef M);
131144
132 /// Construct a builder for a module and collect unresolved nodes attached
133 /// to the module in order to resolve cycles during a call to
134 /// \c LLVMDIBuilderFinalize.
145 /**
146 * Construct a builder for a module and collect unresolved nodes attached
147 * to the module in order to resolve cycles during a call to
148 * \c LLVMDIBuilderFinalize.
149 */
135150 LLVMDIBuilderRef LLVMCreateDIBuilder(LLVMModuleRef M);
136151
137 /// Deallocates the DIBuilder and everything it owns.
138 /// @note You must call \c LLVMDIBuilderFinalize before this
152 /**
153 * Deallocates the DIBuilder and everything it owns.
154 * @note You must call \c LLVMDIBuilderFinalize before this
155 */
139156 void LLVMDisposeDIBuilder(LLVMDIBuilderRef Builder);
140157
141 /// Construct any deferred debug info descriptors.
158 /**
159 * Construct any deferred debug info descriptors.
160 */
142161 void LLVMDIBuilderFinalize(LLVMDIBuilderRef Builder);
143162
144 /// A CompileUnit provides an anchor for all debugging
145 /// information generated during this instance of compilation.
146 /// \param Lang Source programming language, eg.
147 /// \c LLVMDWARFSourceLanguageC99
148 /// \param FileRef File info.
149 /// \param Producer Identify the producer of debugging information
150 /// and code. Usually this is a compiler
151 /// version string.
152 /// \param ProducerLen The length of the C string passed to \c Producer.
153 /// \param isOptimized A boolean flag which indicates whether optimization
154 /// is enabled or not.
155 /// \param Flags This string lists command line options. This
156 /// string is directly embedded in debug info
157 /// output which may be used by a tool
158 /// analyzing generated debugging information.
159 /// \param FlagsLen The length of the C string passed to \c Flags.
160 /// \param RuntimeVer This indicates runtime version for languages like
161 /// Objective-C.
162 /// \param SplitName The name of the file that we'll split debug info
163 /// out into.
164 /// \param SplitNameLen The length of the C string passed to \c SplitName.
165 /// \param Kind The kind of debug information to generate.
166 /// \param DWOId The DWOId if this is a split skeleton compile unit.
167 /// \param SplitDebugInlining Whether to emit inline debug info.
168 /// \param DebugInfoForProfiling Whether to emit extra debug info for
169 /// profile collection.
163 /**
164 * A CompileUnit provides an anchor for all debugging
165 * information generated during this instance of compilation.
166 * \param Lang Source programming language, eg.
167 * \c LLVMDWARFSourceLanguageC99
168 * \param FileRef File info.
169 * \param Producer Identify the producer of debugging information
170 * and code. Usually this is a compiler
171 * version string.
172 * \param ProducerLen The length of the C string passed to \c Producer.
173 * \param isOptimized A boolean flag which indicates whether optimization
174 * is enabled or not.
175 * \param Flags This string lists command line options. This
176 * string is directly embedded in debug info
177 * output which may be used by a tool
178 * analyzing generated debugging information.
179 * \param FlagsLen The length of the C string passed to \c Flags.
180 * \param RuntimeVer This indicates runtime version for languages like
181 * Objective-C.
182 * \param SplitName The name of the file that we'll split debug info
183 * out into.
184 * \param SplitNameLen The length of the C string passed to \c SplitName.
185 * \param Kind The kind of debug information to generate.
186 * \param DWOId The DWOId if this is a split skeleton compile unit.
187 * \param SplitDebugInlining Whether to emit inline debug info.
188 * \param DebugInfoForProfiling Whether to emit extra debug info for
189 * profile collection.
190 */
170191 LLVMMetadataRef LLVMDIBuilderCreateCompileUnit(
171192 LLVMDIBuilderRef Builder, LLVMDWARFSourceLanguage Lang,
172193 LLVMMetadataRef FileRef, const char *Producer, size_t ProducerLen,
175196 LLVMDWARFEmissionKind Kind, unsigned DWOId, LLVMBool SplitDebugInlining,
176197 LLVMBool DebugInfoForProfiling);
177198
178 /// Create a file descriptor to hold debugging information for a file.
179 /// \param Builder The DIBuilder.
180 /// \param Filename File name.
181 /// \param FilenameLen The length of the C string passed to \c Filename.
182 /// \param Directory Directory.
183 /// \param DirectoryLen The length of the C string passed to \c Directory.
199 /**
200 * Create a file descriptor to hold debugging information for a file.
201 * \param Builder The DIBuilder.
202 * \param Filename File name.
203 * \param FilenameLen The length of the C string passed to \c Filename.
204 * \param Directory Directory.
205 * \param DirectoryLen The length of the C string passed to \c Directory.
206 */
184207 LLVMMetadataRef
185208 LLVMDIBuilderCreateFile(LLVMDIBuilderRef Builder, const char *Filename,
186209 size_t FilenameLen, const char *Directory,
187210 size_t DirectoryLen);
188211
189 /// Creates a new DebugLocation that describes a source location.
190 /// \param Line The line in the source file.
191 /// \param Column The column in the source file.
192 /// \param Scope The scope in which the location resides.
193 /// \param InlinedAt The scope where this location was inlined, if at all.
194 /// (optional).
195 /// \note If the item to which this location is attached cannot be
196 /// attributed to a source line, pass 0 for the line and column.
212 /**
213 * Creates a new DebugLocation that describes a source location.
214 * \param Line The line in the source file.
215 * \param Column The column in the source file.
216 * \param Scope The scope in which the location resides.
217 * \param InlinedAt The scope where this location was inlined, if at all.
218 * (optional).
219 * \note If the item to which this location is attached cannot be
220 * attributed to a source line, pass 0 for the line and column.
221 */
197222 LLVMMetadataRef
198223 LLVMDIBuilderCreateDebugLocation(LLVMContextRef Ctx, unsigned Line,
199224 unsigned Column, LLVMMetadataRef Scope,
200225 LLVMMetadataRef InlinedAt);
201226
202227 #ifdef __cplusplus
203 } // end extern "C"
228 } /* end extern "C" */
204229 #endif
205230
206231 #endif