1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
6 <title>Source Level Debugging with LLVM
</title>
7 <link rel=
"stylesheet" href=
"llvm.css" type=
"text/css">
11 <div class=
"doc_title">Source Level Debugging with LLVM
</div>
13 <table class=
"layout" style=
"width:100%">
17 <li><a href=
"#introduction">Introduction
</a>
19 <li><a href=
"#phil">Philosophy behind LLVM debugging information
</a></li>
20 <li><a href=
"#consumers">Debug information consumers
</a></li>
21 <li><a href=
"#debugopt">Debugging optimized code
</a></li>
23 <li><a href=
"#format">Debugging information format
</a>
25 <li><a href=
"#debug_info_descriptors">Debug information descriptors
</a>
27 <li><a href=
"#format_compile_units">Compile unit descriptors
</a></li>
28 <li><a href=
"#format_global_variables">Global variable descriptors
</a></li>
29 <li><a href=
"#format_subprograms">Subprogram descriptors
</a></li>
30 <li><a href=
"#format_blocks">Block descriptors
</a></li>
31 <li><a href=
"#format_basic_type">Basic type descriptors
</a></li>
32 <li><a href=
"#format_derived_type">Derived type descriptors
</a></li>
33 <li><a href=
"#format_composite_type">Composite type descriptors
</a></li>
34 <li><a href=
"#format_subrange">Subrange descriptors
</a></li>
35 <li><a href=
"#format_enumeration">Enumerator descriptors
</a></li>
36 <li><a href=
"#format_variables">Local variables
</a></li>
38 <li><a href=
"#format_common_intrinsics">Debugger intrinsic functions
</a>
40 <li><a href=
"#format_common_stoppoint">llvm.dbg.stoppoint
</a></li>
41 <li><a href=
"#format_common_func_start">llvm.dbg.func.start
</a></li>
42 <li><a href=
"#format_common_region_start">llvm.dbg.region.start
</a></li>
43 <li><a href=
"#format_common_region_end">llvm.dbg.region.end
</a></li>
44 <li><a href=
"#format_common_declare">llvm.dbg.declare
</a></li>
46 <li><a href=
"#format_common_stoppoints">Representing stopping points in the
47 source program
</a></li>
49 <li><a href=
"#ccxx_frontend">C/C++ front-end specific debug information
</a>
51 <li><a href=
"#ccxx_compile_units">C/C++ source file information
</a></li>
52 <li><a href=
"#ccxx_global_variable">C/C++ global variable information
</a></li>
53 <li><a href=
"#ccxx_subprogram">C/C++ function information
</a></li>
54 <li><a href=
"#ccxx_basic_types">C/C++ basic types
</a></li>
55 <li><a href=
"#ccxx_derived_types">C/C++ derived types
</a></li>
56 <li><a href=
"#ccxx_composite_types">C/C++ struct/union types
</a></li>
57 <li><a href=
"#ccxx_enumeration_types">C/C++ enumeration types
</a></li>
62 <img src=
"img/venusflytrap.jpg" alt=
"A leafy and green bug eater" width=
"247"
67 <div class=
"doc_author">
68 <p>Written by
<a href=
"mailto:sabre@nondot.org">Chris Lattner
</a>
69 and
<a href=
"mailto:jlaskey@mac.com">Jim Laskey
</a></p>
73 <!-- *********************************************************************** -->
74 <div class=
"doc_section"><a name=
"introduction">Introduction
</a></div>
75 <!-- *********************************************************************** -->
77 <div class=
"doc_text">
79 <p>This document is the central repository for all information pertaining to
80 debug information in LLVM. It describes the
<a href=
"#format">actual format
81 that the LLVM debug information
</a> takes, which is useful for those
82 interested in creating front-ends or dealing directly with the information.
83 Further, this document provides specific examples of what debug information
88 <!-- ======================================================================= -->
89 <div class=
"doc_subsection">
90 <a name=
"phil">Philosophy behind LLVM debugging information
</a>
93 <div class=
"doc_text">
95 <p>The idea of the LLVM debugging information is to capture how the important
96 pieces of the source-language's Abstract Syntax Tree map onto LLVM code.
97 Several design aspects have shaped the solution that appears here. The
98 important ones are:
</p>
101 <li>Debugging information should have very little impact on the rest of the
102 compiler. No transformations, analyses, or code generators should need to
103 be modified because of debugging information.
</li>
105 <li>LLVM optimizations should interact in
<a href=
"#debugopt">well-defined and
106 easily described ways
</a> with the debugging information.
</li>
108 <li>Because LLVM is designed to support arbitrary programming languages,
109 LLVM-to-LLVM tools should not need to know anything about the semantics of
110 the source-level-language.
</li>
112 <li>Source-level languages are often
<b>widely
</b> different from one another.
113 LLVM should not put any restrictions of the flavor of the source-language,
114 and the debugging information should work with any language.
</li>
116 <li>With code generator support, it should be possible to use an LLVM compiler
117 to compile a program to native machine code and standard debugging
118 formats. This allows compatibility with traditional machine-code level
119 debuggers, like GDB or DBX.
</li>
122 <p>The approach used by the LLVM implementation is to use a small set
123 of
<a href=
"#format_common_intrinsics">intrinsic functions
</a> to define a
124 mapping between LLVM program objects and the source-level objects. The
125 description of the source-level program is maintained in LLVM global
126 variables in an
<a href=
"#ccxx_frontend">implementation-defined format
</a>
127 (the C/C++ front-end currently uses working draft
7 of
128 the
<a href=
"http://www.eagercon.com/dwarf/dwarf3std.htm">DWARF
3
131 <p>When a program is being debugged, a debugger interacts with the user and
132 turns the stored debug information into source-language specific information.
133 As such, a debugger must be aware of the source-language, and is thus tied to
134 a specific language or family of languages.
</p>
138 <!-- ======================================================================= -->
139 <div class=
"doc_subsection">
140 <a name=
"consumers">Debug information consumers
</a>
143 <div class=
"doc_text">
145 <p>The role of debug information is to provide meta information normally
146 stripped away during the compilation process. This meta information provides
147 an LLVM user a relationship between generated code and the original program
150 <p>Currently, debug information is consumed by the DwarfWriter to produce dwarf
151 information used by the gdb debugger. Other targets could use the same
152 information to produce stabs or other debug forms.
</p>
154 <p>It would also be reasonable to use debug information to feed profiling tools
155 for analysis of generated code, or, tools for reconstructing the original
156 source from generated code.
</p>
158 <p>TODO - expound a bit more.
</p>
162 <!-- ======================================================================= -->
163 <div class=
"doc_subsection">
164 <a name=
"debugopt">Debugging optimized code
</a>
167 <div class=
"doc_text">
169 <p>An extremely high priority of LLVM debugging information is to make it
170 interact well with optimizations and analysis. In particular, the LLVM debug
171 information provides the following guarantees:
</p>
174 <li>LLVM debug information
<b>always provides information to accurately read
175 the source-level state of the program
</b>, regardless of which LLVM
176 optimizations have been run, and without any modification to the
177 optimizations themselves. However, some optimizations may impact the
178 ability to modify the current state of the program with a debugger, such
179 as setting program variables, or calling functions that have been
182 <li>LLVM optimizations gracefully interact with debugging information. If
183 they are not aware of debug information, they are automatically disabled
184 as necessary in the cases that would invalidate the debug info. This
185 retains the LLVM features, making it easy to write new
186 transformations.
</li>
188 <li>As desired, LLVM optimizations can be upgraded to be aware of the LLVM
189 debugging information, allowing them to update the debugging information
190 as they perform aggressive optimizations. This means that, with effort,
191 the LLVM optimizers could optimize debug code just as well as non-debug
194 <li>LLVM debug information does not prevent many important optimizations from
195 happening (for example inlining, basic block reordering/merging/cleanup,
196 tail duplication, etc), further reducing the amount of the compiler that
197 eventually is
"aware" of debugging information.
</li>
199 <li>LLVM debug information is automatically optimized along with the rest of
200 the program, using existing facilities. For example, duplicate
201 information is automatically merged by the linker, and unused information
202 is automatically removed.
</li>
205 <p>Basically, the debug information allows you to compile a program with
206 "<tt>-O0 -g</tt>" and get full debug information, allowing you to arbitrarily
207 modify the program as it executes from a debugger. Compiling a program with
208 "<tt>-O3 -g</tt>" gives you full debug information that is always available
209 and accurate for reading (e.g., you get accurate stack traces despite tail
210 call elimination and inlining), but you might lose the ability to modify the
211 program and call functions where were optimized out of the program, or
212 inlined away completely.
</p>
214 <p><a href=
"TestingGuide.html#quicktestsuite">LLVM test suite
</a> provides a
215 framework to test optimizer's handling of debugging information. It can be
218 <div class=
"doc_code">
220 % cd llvm/projects/test-suite/MultiSource/Benchmarks # or some other level
225 <p>This will test impact of debugging information on optimization passes. If
226 debugging information influences optimization passes then it will be reported
227 as a failure. See
<a href=
"TestingGuide.html">TestingGuide
</a> for more
228 information on LLVM test infrastructure and how to run various tests.
</p>
232 <!-- *********************************************************************** -->
233 <div class=
"doc_section">
234 <a name=
"format">Debugging information format
</a>
236 <!-- *********************************************************************** -->
238 <div class=
"doc_text">
240 <p>LLVM debugging information has been carefully designed to make it possible
241 for the optimizer to optimize the program and debugging information without
242 necessarily having to know anything about debugging information. In
243 particular, the global constant merging pass automatically eliminates
244 duplicated debugging information (often caused by header files), the global
245 dead code elimination pass automatically deletes debugging information for a
246 function if it decides to delete the function, and the linker eliminates
247 debug information when it merges
<tt>linkonce
</tt> functions.
</p>
249 <p>To do this, most of the debugging information (descriptors for types,
250 variables, functions, source files, etc) is inserted by the language
251 front-end in the form of LLVM global variables. These LLVM global variables
252 are no different from any other global variables, except that they have a web
253 of LLVM intrinsic functions that point to them. If the last references to a
254 particular piece of debugging information are deleted (for example, by the
255 <tt>-globaldce
</tt> pass), the extraneous debug information will
256 automatically become dead and be removed by the optimizer.
</p>
258 <p>Debug information is designed to be agnostic about the target debugger and
259 debugging information representation (e.g. DWARF/Stabs/etc). It uses a
260 generic machine debug information pass to decode the information that
261 represents variables, types, functions, namespaces, etc: this allows for
262 arbitrary source-language semantics and type-systems to be used, as long as
263 there is a module written for the target debugger to interpret the
264 information. In addition, debug global variables are declared in
265 the
<tt>"llvm.metadata"</tt> section. All values declared in this section
266 are stripped away after target debug information is constructed and before
267 the program object is emitted.
</p>
269 <p>To provide basic functionality, the LLVM debugger does have to make some
270 assumptions about the source-level language being debugged, though it keeps
271 these to a minimum. The only common features that the LLVM debugger assumes
272 exist are
<a href=
"#format_compile_units">source files
</a>,
273 and
<a href=
"#format_global_variables">program objects
</a>. These abstract
274 objects are used by a debugger to form stack traces, show information about
275 local variables, etc.
</p>
277 <p>This section of the documentation first describes the representation aspects
278 common to any source-language. The
<a href=
"#ccxx_frontend">next section
</a>
279 describes the data layout conventions used by the C and C++ front-ends.
</p>
283 <!-- ======================================================================= -->
284 <div class=
"doc_subsection">
285 <a name=
"debug_info_descriptors">Debug information descriptors
</a>
288 <div class=
"doc_text">
290 <p>In consideration of the complexity and volume of debug information, LLVM
291 provides a specification for well formed debug global variables. The
292 constant value of each of these globals is one of a limited set of
293 structures, known as debug descriptors.
</p>
295 <p>Consumers of LLVM debug information expect the descriptors for program
296 objects to start in a canonical format, but the descriptors can include
297 additional information appended at the end that is source-language
298 specific. All LLVM debugging information is versioned, allowing backwards
299 compatibility in the case that the core structures need to change in some
300 way. Also, all debugging information objects start with a tag to indicate
301 what type of object it is. The source-language is allowed to define its own
302 objects, by using unreserved tag numbers. We recommend using with tags in
303 the range
0x1000 thru
0x2000 (there is a defined enum DW_TAG_user_base =
306 <p>The fields of debug descriptors used internally by LLVM (MachineModuleInfo)
307 are restricted to only the simple data types
<tt>int
</tt>,
<tt>uint
</tt>,
308 <tt>bool
</tt>,
<tt>float
</tt>,
<tt>double
</tt>,
<tt>i8*
</tt> and
309 <tt>{
}*
</tt>. References to arbitrary values are handled using a
310 <tt>{
}*
</tt> and a cast to
<tt>{
}*
</tt> expression; typically
311 references to other field descriptors, arrays of descriptors or global
314 <div class=
"doc_code">
316 %llvm.dbg.object.type = type {
323 <p><a name=
"LLVMDebugVersion">The first field of a descriptor is always an
324 <tt>uint
</tt> containing a tag value identifying the content of the
325 descriptor. The remaining fields are specific to the descriptor. The values
326 of tags are loosely bound to the tag values of DWARF information entries.
327 However, that does not restrict the use of the information supplied to DWARF
328 targets. To facilitate versioning of debug information, the tag is augmented
329 with the current debug version (LLVMDebugVersion =
4 <<
16 or
0x40000 or
332 <p>The details of the various descriptors follow.
</p>
336 <!-- ======================================================================= -->
337 <div class=
"doc_subsubsection">
338 <a name=
"format_compile_units">Compile unit descriptors
</a>
341 <div class=
"doc_text">
343 <div class=
"doc_code">
345 %
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a> = type {
346 i32, ;; Tag =
17 +
<a href=
"#LLVMDebugVersion">LLVMDebugVersion
</a> (DW_TAG_compile_unit)
347 { }*, ;; Compile unit anchor = cast = (%
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_units
</a> to { }*)
348 i32, ;; DWARF language identifier (ex. DW_LANG_C89)
349 i8*, ;; Source file name
350 i8*, ;; Source file directory (includes trailing slash)
351 i8* ;; Producer (ex.
"4.0.1 LLVM (LLVM research group)")
352 i1, ;; True if this is a main compile unit.
353 i1, ;; True if this is optimized.
355 i32 ;; Runtime version
360 <p>These descriptors contain a source language ID for the file (we use the DWARF
361 3.0 ID numbers, such as
<tt>DW_LANG_C89
</tt>,
<tt>DW_LANG_C_plus_plus
</tt>,
362 <tt>DW_LANG_Cobol74
</tt>, etc), three strings describing the filename,
363 working directory of the compiler, and an identifier string for the compiler
364 that produced it.
</p>
366 <p>Compile unit descriptors provide the root context for objects declared in a
367 specific source file. Global variables and top level functions would be
368 defined using this context. Compile unit descriptors also provide context
369 for source line correspondence.
</p>
371 <p>Each input file is encoded as a separate compile unit in LLVM debugging
372 information output. However, many target specific tool chains prefer to
373 encode only one compile unit in an object file. In this situation, the LLVM
374 code generator will include debugging information entities in the compile
375 unit that is marked as main compile unit. The code generator accepts maximum
376 one main compile unit per module. If a module does not contain any main
377 compile unit then the code generator will emit multiple compile units in the
378 output object file.
</p>
382 <!-- ======================================================================= -->
383 <div class=
"doc_subsubsection">
384 <a name=
"format_global_variables">Global variable descriptors
</a>
387 <div class=
"doc_text">
389 <div class=
"doc_code">
391 %
<a href=
"#format_global_variables">llvm.dbg.global_variable.type
</a> = type {
392 i32, ;; Tag =
52 +
<a href=
"#LLVMDebugVersion">LLVMDebugVersion
</a> (DW_TAG_variable)
393 { }*, ;; Global variable anchor = cast (%
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a>* %
<a href=
"#format_global_variables">llvm.dbg.global_variables
</a> to { }*),
394 { }*, ;; Reference to context descriptor
396 i8*, ;; Display name (fully qualified C++ name)
397 i8*, ;; MIPS linkage name (for C++)
398 { }*, ;; Reference to compile unit where defined
399 i32, ;; Line number where defined
400 { }*, ;; Reference to type descriptor
401 i1, ;; True if the global is local to compile unit (static)
402 i1, ;; True if the global is defined in the compile unit (not extern)
403 { }* ;; Reference to the global variable
408 <p>These descriptors provide debug information about globals variables. The
409 provide details such as name, type and where the variable is defined.
</p>
413 <!-- ======================================================================= -->
414 <div class=
"doc_subsubsection">
415 <a name=
"format_subprograms">Subprogram descriptors
</a>
418 <div class=
"doc_text">
420 <div class=
"doc_code">
422 %
<a href=
"#format_subprograms">llvm.dbg.subprogram.type
</a> = type {
423 i32, ;; Tag =
46 +
<a href=
"#LLVMDebugVersion">LLVMDebugVersion
</a> (DW_TAG_subprogram)
424 { }*, ;; Subprogram anchor = cast (%
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a>* %
<a href=
"#format_subprograms">llvm.dbg.subprograms
</a> to { }*),
425 { }*, ;; Reference to context descriptor
427 i8*, ;; Display name (fully qualified C++ name)
428 i8*, ;; MIPS linkage name (for C++)
429 { }*, ;; Reference to compile unit where defined
430 i32, ;; Line number where defined
431 { }*, ;; Reference to type descriptor
432 i1, ;; True if the global is local to compile unit (static)
433 i1 ;; True if the global is defined in the compile unit (not extern)
438 <p>These descriptors provide debug information about functions, methods and
439 subprograms. They provide details such as name, return types and the source
440 location where the subprogram is defined.
</p>
444 <!-- ======================================================================= -->
445 <div class=
"doc_subsubsection">
446 <a name=
"format_blocks">Block descriptors
</a>
449 <div class=
"doc_text">
451 <div class=
"doc_code">
453 %
<a href=
"#format_blocks">llvm.dbg.block
</a> = type {
454 i32, ;; Tag =
13 +
<a href=
"#LLVMDebugVersion">LLVMDebugVersion
</a> (DW_TAG_lexical_block)
455 { }* ;; Reference to context descriptor
460 <p>These descriptors provide debug information about nested blocks within a
461 subprogram. The array of member descriptors is used to define local
462 variables and deeper nested blocks.
</p>
466 <!-- ======================================================================= -->
467 <div class=
"doc_subsubsection">
468 <a name=
"format_basic_type">Basic type descriptors
</a>
471 <div class=
"doc_text">
473 <div class=
"doc_code">
475 %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> = type {
476 i32, ;; Tag =
36 +
<a href=
"#LLVMDebugVersion">LLVMDebugVersion
</a> (DW_TAG_base_type)
477 { }*, ;; Reference to context (typically a compile unit)
478 i8*, ;; Name (may be
"" for anonymous types)
479 { }*, ;; Reference to compile unit where defined (may be NULL)
480 i32, ;; Line number where defined (may be
0)
482 i64, ;; Alignment in bits
483 i64, ;; Offset in bits
485 i32 ;; DWARF type encoding
490 <p>These descriptors define primitive types used in the code. Example int, bool
491 and float. The context provides the scope of the type, which is usually the
492 top level. Since basic types are not usually user defined the compile unit
493 and line number can be left as NULL and
0. The size, alignment and offset
494 are expressed in bits and can be
64 bit values. The alignment is used to
495 round the offset when embedded in a
496 <a href=
"#format_composite_type">composite type
</a> (example to keep float
497 doubles on
64 bit boundaries.) The offset is the bit offset if embedded in
498 a
<a href=
"#format_composite_type">composite type
</a>.
</p>
500 <p>The type encoding provides the details of the type. The values are typically
501 one of the following:
</p>
503 <div class=
"doc_code">
509 DW_ATE_signed_char =
6
511 DW_ATE_unsigned_char =
8
517 <!-- ======================================================================= -->
518 <div class=
"doc_subsubsection">
519 <a name=
"format_derived_type">Derived type descriptors
</a>
522 <div class=
"doc_text">
524 <div class=
"doc_code">
526 %
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a> = type {
527 i32, ;; Tag (see below)
528 { }*, ;; Reference to context
529 i8*, ;; Name (may be
"" for anonymous types)
530 { }*, ;; Reference to compile unit where defined (may be NULL)
531 i32, ;; Line number where defined (may be
0)
533 i32, ;; Alignment in bits
534 i32, ;; Offset in bits
535 { }* ;; Reference to type derived from
540 <p>These descriptors are used to define types derived from other types. The
541 value of the tag varies depending on the meaning. The following are possible
544 <div class=
"doc_code">
546 DW_TAG_formal_parameter =
5
548 DW_TAG_pointer_type =
15
549 DW_TAG_reference_type =
16
551 DW_TAG_const_type =
38
552 DW_TAG_volatile_type =
53
553 DW_TAG_restrict_type =
55
557 <p><tt>DW_TAG_member
</tt> is used to define a member of
558 a
<a href=
"#format_composite_type">composite type
</a>
559 or
<a href=
"#format_subprograms">subprogram
</a>. The type of the member is
560 the
<a href=
"#format_derived_type">derived
561 type
</a>.
<tt>DW_TAG_formal_parameter
</tt> is used to define a member which
562 is a formal argument of a subprogram.
</p>
564 <p><tt>DW_TAG_typedef
</tt> is used to provide a name for the derived type.
</p>
566 <p><tt>DW_TAG_pointer_type
</tt>,
<tt>DW_TAG_reference_type
</tt>,
567 <tt>DW_TAG_const_type
</tt>,
<tt>DW_TAG_volatile_type
</tt>
568 and
<tt>DW_TAG_restrict_type
</tt> are used to qualify
569 the
<a href=
"#format_derived_type">derived type
</a>.
</p>
571 <p><a href=
"#format_derived_type">Derived type
</a> location can be determined
572 from the compile unit and line number. The size, alignment and offset are
573 expressed in bits and can be
64 bit values. The alignment is used to round
574 the offset when embedded in a
<a href=
"#format_composite_type">composite
575 type
</a> (example to keep float doubles on
64 bit boundaries.) The offset is
576 the bit offset if embedded in a
<a href=
"#format_composite_type">composite
579 <p>Note that the
<tt>void *
</tt> type is expressed as a
580 <tt>llvm.dbg.derivedtype.type
</tt> with tag of
<tt>DW_TAG_pointer_type
</tt>
581 and
<tt>NULL
</tt> derived type.
</p>
585 <!-- ======================================================================= -->
586 <div class=
"doc_subsubsection">
587 <a name=
"format_composite_type">Composite type descriptors
</a>
590 <div class=
"doc_text">
592 <div class=
"doc_code">
594 %
<a href=
"#format_composite_type">llvm.dbg.compositetype.type
</a> = type {
595 i32, ;; Tag (see below)
596 { }*, ;; Reference to context
597 i8*, ;; Name (may be
"" for anonymous types)
598 { }*, ;; Reference to compile unit where defined (may be NULL)
599 i32, ;; Line number where defined (may be
0)
601 i64, ;; Alignment in bits
602 i64, ;; Offset in bits
604 { }*, ;; Reference to type derived from
605 { }*, ;; Reference to array of member descriptors
606 i32 ;; Runtime languages
611 <p>These descriptors are used to define types that are composed of
0 or more
612 elements. The value of the tag varies depending on the meaning. The following
613 are possible tag values:
</p>
615 <div class=
"doc_code">
617 DW_TAG_array_type =
1
618 DW_TAG_enumeration_type =
4
619 DW_TAG_structure_type =
19
620 DW_TAG_union_type =
23
621 DW_TAG_vector_type =
259
622 DW_TAG_subroutine_type =
21
623 DW_TAG_inheritance =
28
627 <p>The vector flag indicates that an array type is a native packed vector.
</p>
629 <p>The members of array types (tag =
<tt>DW_TAG_array_type
</tt>) or vector types
630 (tag =
<tt>DW_TAG_vector_type
</tt>) are
<a href=
"#format_subrange">subrange
631 descriptors
</a>, each representing the range of subscripts at that level of
634 <p>The members of enumeration types (tag =
<tt>DW_TAG_enumeration_type
</tt>) are
635 <a href=
"#format_enumeration">enumerator descriptors
</a>, each representing
636 the definition of enumeration value for the set.
</p>
638 <p>The members of structure (tag =
<tt>DW_TAG_structure_type
</tt>) or union (tag
639 =
<tt>DW_TAG_union_type
</tt>) types are any one of
640 the
<a href=
"#format_basic_type">basic
</a>,
641 <a href=
"#format_derived_type">derived
</a>
642 or
<a href=
"#format_composite_type">composite
</a> type descriptors, each
643 representing a field member of the structure or union.
</p>
645 <p>For C++ classes (tag =
<tt>DW_TAG_structure_type
</tt>), member descriptors
646 provide information about base classes, static members and member
647 functions. If a member is a
<a href=
"#format_derived_type">derived type
648 descriptor
</a> and has a tag of
<tt>DW_TAG_inheritance
</tt>, then the type
649 represents a base class. If the member of is
650 a
<a href=
"#format_global_variables">global variable descriptor
</a> then it
651 represents a static member. And, if the member is
652 a
<a href=
"#format_subprograms">subprogram descriptor
</a> then it represents
653 a member function. For static members and member
654 functions,
<tt>getName()
</tt> returns the members link or the C++ mangled
655 name.
<tt>getDisplayName()
</tt> the simplied version of the name.
</p>
657 <p>The first member of subroutine (tag =
<tt>DW_TAG_subroutine_type
</tt>) type
658 elements is the return type for the subroutine. The remaining elements are
659 the formal arguments to the subroutine.
</p>
661 <p><a href=
"#format_composite_type">Composite type
</a> location can be
662 determined from the compile unit and line number. The size, alignment and
663 offset are expressed in bits and can be
64 bit values. The alignment is used
664 to round the offset when embedded in
665 a
<a href=
"#format_composite_type">composite type
</a> (as an example, to keep
666 float doubles on
64 bit boundaries.) The offset is the bit offset if embedded
667 in a
<a href=
"#format_composite_type">composite type
</a>.
</p>
671 <!-- ======================================================================= -->
672 <div class=
"doc_subsubsection">
673 <a name=
"format_subrange">Subrange descriptors
</a>
676 <div class=
"doc_text">
678 <div class=
"doc_code">
680 %
<a href=
"#format_subrange">llvm.dbg.subrange.type
</a> = type {
681 i32, ;; Tag =
33 +
<a href=
"#LLVMDebugVersion">LLVMDebugVersion
</a> (DW_TAG_subrange_type)
688 <p>These descriptors are used to define ranges of array subscripts for an array
689 <a href=
"#format_composite_type">composite type
</a>. The low value defines
690 the lower bounds typically zero for C/C++. The high value is the upper
691 bounds. Values are
64 bit. High - low +
1 is the size of the array. If low
692 == high the array will be unbounded.
</p>
696 <!-- ======================================================================= -->
697 <div class=
"doc_subsubsection">
698 <a name=
"format_enumeration">Enumerator descriptors
</a>
701 <div class=
"doc_text">
703 <div class=
"doc_code">
705 %
<a href=
"#format_enumeration">llvm.dbg.enumerator.type
</a> = type {
706 i32, ;; Tag =
40 +
<a href=
"#LLVMDebugVersion">LLVMDebugVersion
</a> (DW_TAG_enumerator)
713 <p>These descriptors are used to define members of an
714 enumeration
<a href=
"#format_composite_type">composite type
</a>, it
715 associates the name to the value.
</p>
719 <!-- ======================================================================= -->
720 <div class=
"doc_subsubsection">
721 <a name=
"format_variables">Local variables
</a>
724 <div class=
"doc_text">
726 <div class=
"doc_code">
728 %
<a href=
"#format_variables">llvm.dbg.variable.type
</a> = type {
729 i32, ;; Tag (see below)
732 { }*, ;; Reference to compile unit where defined
733 i32, ;; Line number where defined
734 { }* ;; Type descriptor
739 <p>These descriptors are used to define variables local to a sub program. The
740 value of the tag depends on the usage of the variable:
</p>
742 <div class=
"doc_code">
744 DW_TAG_auto_variable =
256
745 DW_TAG_arg_variable =
257
746 DW_TAG_return_variable =
258
750 <p>An auto variable is any variable declared in the body of the function. An
751 argument variable is any variable that appears as a formal argument to the
752 function. A return variable is used to track the result of a function and
753 has no source correspondent.
</p>
755 <p>The context is either the subprogram or block where the variable is defined.
756 Name the source variable name. Compile unit and line indicate where the
757 variable was defined. Type descriptor defines the declared type of the
762 <!-- ======================================================================= -->
763 <div class=
"doc_subsection">
764 <a name=
"format_common_intrinsics">Debugger intrinsic functions
</a>
767 <div class=
"doc_text">
769 <p>LLVM uses several intrinsic functions (name prefixed with
"llvm.dbg") to
770 provide debug information at various points in generated code.
</p>
774 <!-- ======================================================================= -->
775 <div class=
"doc_subsubsection">
776 <a name=
"format_common_stoppoint">llvm.dbg.stoppoint
</a>
779 <div class=
"doc_text">
781 void %
<a href=
"#format_common_stoppoint">llvm.dbg.stoppoint
</a>( uint, uint, { }* )
784 <p>This intrinsic is used to provide correspondence between the source file and
785 the generated code. The first argument is the line number (base
1), second
786 argument is the column number (
0 if unknown) and the third argument the
787 source
<tt>%
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a>*
</tt>
788 cast to a
<tt>{
}*
</tt>. Code following a call to this intrinsic will
789 have been defined in close proximity of the line, column and file. This
790 information holds until the next call
791 to
<tt>%
<a href=
"#format_common_stoppoint">lvm.dbg.stoppoint
</a></tt>.
</p>
795 <!-- ======================================================================= -->
796 <div class=
"doc_subsubsection">
797 <a name=
"format_common_func_start">llvm.dbg.func.start
</a>
800 <div class=
"doc_text">
802 void %
<a href=
"#format_common_func_start">llvm.dbg.func.start
</a>( { }* )
805 <p>This intrinsic is used to link the debug information
806 in
<tt>%
<a href=
"#format_subprograms">llvm.dbg.subprogram
</a></tt> to the
807 function. It defines the beginning of the function's declarative region
808 (scope). It also implies a call to
809 %
<tt><a href=
"#format_common_stoppoint">llvm.dbg.stoppoint
</a></tt> which
810 defines a source line
"stop point". The intrinsic should be called early in
811 the function after the all the alloca instructions. It should be paired off
813 <tt>%
<a href=
"#format_common_region_end">llvm.dbg.region.end
</a></tt>.
814 The function's single argument is
815 the
<tt>%
<a href=
"#format_subprograms">llvm.dbg.subprogram.type
</a></tt>.
</p>
819 <!-- ======================================================================= -->
820 <div class=
"doc_subsubsection">
821 <a name=
"format_common_region_start">llvm.dbg.region.start
</a>
824 <div class=
"doc_text">
826 void %
<a href=
"#format_common_region_start">llvm.dbg.region.start
</a>( { }* )
829 <p>This intrinsic is used to define the beginning of a declarative scope (ex.
830 block) for local language elements. It should be paired off with a closing
831 <tt>%
<a href=
"#format_common_region_end">llvm.dbg.region.end
</a></tt>. The
832 function's single argument is
833 the
<tt>%
<a href=
"#format_blocks">llvm.dbg.block
</a></tt> which is
839 <!-- ======================================================================= -->
840 <div class=
"doc_subsubsection">
841 <a name=
"format_common_region_end">llvm.dbg.region.end
</a>
844 <div class=
"doc_text">
846 void %
<a href=
"#format_common_region_end">llvm.dbg.region.end
</a>( { }* )
849 <p>This intrinsic is used to define the end of a declarative scope (ex. block)
850 for local language elements. It should be paired off with an
851 opening
<tt>%
<a href=
"#format_common_region_start">llvm.dbg.region.start
</a></tt>
852 or
<tt>%
<a href=
"#format_common_func_start">llvm.dbg.func.start
</a></tt>.
853 The function's single argument is either
854 the
<tt>%
<a href=
"#format_blocks">llvm.dbg.block
</a></tt> or
855 the
<tt>%
<a href=
"#format_subprograms">llvm.dbg.subprogram.type
</a></tt>
860 <!-- ======================================================================= -->
861 <div class=
"doc_subsubsection">
862 <a name=
"format_common_declare">llvm.dbg.declare
</a>
865 <div class=
"doc_text">
867 void %
<a href=
"#format_common_declare">llvm.dbg.declare
</a>( { } *, { }* )
870 <p>This intrinsic provides information about a local element (ex. variable.) The
871 first argument is the alloca for the variable, cast to a
<tt>{ }*
</tt>. The
873 the
<tt>%
<a href=
"#format_variables">llvm.dbg.variable
</a></tt> containing
874 the description of the variable, also cast to a
<tt>{ }*
</tt>.
</p>
878 <!-- ======================================================================= -->
879 <div class=
"doc_subsection">
880 <a name=
"format_common_stoppoints">
881 Representing stopping points in the source program
885 <div class=
"doc_text">
887 <p>LLVM debugger
"stop points" are a key part of the debugging representation
888 that allows the LLVM to maintain simple semantics
889 for
<a href=
"#debugopt">debugging optimized code
</a>. The basic idea is that
890 the front-end inserts calls to
891 the
<a href=
"#format_common_stoppoint">%
<tt>llvm.dbg.stoppoint
</tt></a>
892 intrinsic function at every point in the program where a debugger should be
893 able to inspect the program (these correspond to places a debugger stops when
894 you
"<tt>step</tt>" through it). The front-end can choose to place these as
895 fine-grained as it would like (for example, before every subexpression
896 evaluated), but it is recommended to only put them after every source
897 statement that includes executable code.
</p>
899 <p>Using calls to this intrinsic function to demark legal points for the
900 debugger to inspect the program automatically disables any optimizations that
901 could potentially confuse debugging information. To
902 non-debug-information-aware transformations, these calls simply look like
903 calls to an external function, which they must assume to do anything
904 (including reading or writing to any part of reachable memory). On the other
905 hand, it does not impact many optimizations, such as code motion of
906 non-trapping instructions, nor does it impact optimization of subexpressions,
907 code duplication transformations, or basic-block reordering
912 <!-- ======================================================================= -->
913 <div class=
"doc_subsection">
914 <a name=
"format_common_lifetime">Object lifetimes and scoping
</a>
917 <div class=
"doc_text">
918 <p>In many languages, the local variables in functions can have their lifetime
919 or scope limited to a subset of a function. In the C family of languages,
920 for example, variables are only live (readable and writable) within the
921 source block that they are defined in. In functional languages, values are
922 only readable after they have been defined. Though this is a very obvious
923 concept, it is also non-trivial to model in LLVM, because it has no notion of
924 scoping in this sense, and does not want to be tied to a language's scoping
927 <p>In order to handle this, the LLVM debug format uses the notion of
"regions"
928 of a function, delineated by calls to intrinsic functions. These intrinsic
929 functions define new regions of the program and indicate when the region
930 lifetime expires. Consider the following C fragment, for example:
</p>
932 <div class=
"doc_code">
946 <p>Compiled to LLVM, this function would be represented like this:
</p>
948 <div class=
"doc_code">
958 call void @
<a href=
"#format_common_func_start">llvm.dbg.func.start
</a>( %
<a href=
"#format_subprograms">llvm.dbg.subprogram.type
</a>* @llvm.dbg.subprogram )
960 call void @
<a href=
"#format_common_stoppoint">llvm.dbg.stoppoint
</a>( uint
2, uint
2, %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a>* @llvm.dbg.compile_unit )
962 call void @
<a href=
"#format_common_declare">llvm.dbg.declare
</a>({}* %X, ...)
963 call void @
<a href=
"#format_common_declare">llvm.dbg.declare
</a>({}* %Y, ...)
965 <i>;; Evaluate expression on line
2, assigning to X.
</i>
967 call void @
<a href=
"#format_common_stoppoint">llvm.dbg.stoppoint
</a>( uint
3, uint
2, %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a>* @llvm.dbg.compile_unit )
969 <i>;; Evaluate expression on line
3, assigning to Y.
</i>
971 call void @
<a href=
"#format_common_stoppoint">llvm.region.start
</a>()
972 call void @
<a href=
"#format_common_stoppoint">llvm.dbg.stoppoint
</a>( uint
5, uint
4, %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a>* @llvm.dbg.compile_unit )
973 call void @
<a href=
"#format_common_declare">llvm.dbg.declare
</a>({}* %X, ...)
975 <i>;; Evaluate expression on line
5, assigning to Z.
</i>
977 call void @
<a href=
"#format_common_stoppoint">llvm.dbg.stoppoint
</a>( uint
7, uint
2, %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a>* @llvm.dbg.compile_unit )
978 call void @
<a href=
"#format_common_region_end">llvm.region.end
</a>()
980 call void @
<a href=
"#format_common_stoppoint">llvm.dbg.stoppoint
</a>( uint
9, uint
2, %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a>* @llvm.dbg.compile_unit )
982 call void @
<a href=
"#format_common_region_end">llvm.region.end
</a>()
989 <p>This example illustrates a few important details about the LLVM debugging
990 information. In particular, it shows how the various intrinsics are applied
991 together to allow a debugger to analyze the relationship between statements,
992 variable definitions, and the code used to implement the function.
</p>
995 intrinsic
<tt>%
<a href=
"#format_common_func_start">llvm.dbg.func.start
</a></tt>
996 provides a link with the
<a href=
"#format_subprograms">subprogram
997 descriptor
</a> containing the details of this function. This call also
998 defines the beginning of the function region, bounded by
999 the
<tt>%
<a href=
"#format_common_region_end">llvm.region.end
</a></tt> at the
1000 end of the function. This region is used to bracket the lifetime of
1001 variables declared within. For a function, this outer region defines a new
1002 stack frame whose lifetime ends when the region is ended.
</p>
1004 <p>It is possible to define inner regions for short term variables by using the
1005 %
<a href=
"#format_common_stoppoint"><tt>llvm.region.start
</tt></a>
1006 and
<a href=
"#format_common_region_end"><tt>%llvm.region.end
</tt></a> to
1007 bound a region. The inner region in this example would be for the block
1008 containing the declaration of Z.
</p>
1010 <p>Using regions to represent the boundaries of source-level functions allow
1011 LLVM interprocedural optimizations to arbitrarily modify LLVM functions
1012 without having to worry about breaking mapping information between the LLVM
1013 code and the and source-level program. In particular, the inliner requires
1014 no modification to support inlining with debugging information: there is no
1015 explicit correlation drawn between LLVM functions and their source-level
1016 counterparts (note however, that if the inliner inlines all instances of a
1017 non-strong-linkage function into its caller that it will not be possible for
1018 the user to manually invoke the inlined function from a debugger).
</p>
1020 <p>Once the function has been defined,
1021 the
<a href=
"#format_common_stoppoint"><tt>stopping point
</tt></a>
1022 corresponding to line #
2 (column #
2) of the function is encountered. At this
1023 point in the function,
<b>no
</b> local variables are live. As lines
2 and
3
1024 of the example are executed, their variable definitions are introduced into
1026 %
<a href=
"#format_common_declare"><tt>llvm.dbg.declare
</tt></a>, without the
1027 need to specify a new region. These variables do not require new regions to
1028 be introduced because they go out of scope at the same point in the program:
1031 <p>In contrast, the
<tt>Z
</tt> variable goes out of scope at a different time,
1032 on line
7. For this reason, it is defined within the inner region, which
1033 kills the availability of
<tt>Z
</tt> before the code for line
8 is executed.
1034 In this way, regions can support arbitrary source-language scoping rules, as
1035 long as they can only be nested (ie, one scope cannot partially overlap with
1036 a part of another scope).
</p>
1038 <p>It is worth noting that this scoping mechanism is used to control scoping of
1039 all declarations, not just variable declarations. For example, the scope of
1040 a C++ using declaration is controlled with this and could change how name
1041 lookup is performed.
</p>
1045 <!-- *********************************************************************** -->
1046 <div class=
"doc_section">
1047 <a name=
"ccxx_frontend">C/C++ front-end specific debug information
</a>
1049 <!-- *********************************************************************** -->
1051 <div class=
"doc_text">
1053 <p>The C and C++ front-ends represent information about the program in a format
1054 that is effectively identical
1055 to
<a href=
"http://www.eagercon.com/dwarf/dwarf3std.htm">DWARF
3.0</a> in
1056 terms of information content. This allows code generators to trivially
1057 support native debuggers by generating standard dwarf information, and
1058 contains enough information for non-dwarf targets to translate it as
1061 <p>This section describes the forms used to represent C and C++ programs. Other
1062 languages could pattern themselves after this (which itself is tuned to
1063 representing programs in the same way that DWARF
3 does), or they could
1064 choose to provide completely different forms if they don't fit into the DWARF
1065 model. As support for debugging information gets added to the various LLVM
1066 source-language front-ends, the information used should be documented
1069 <p>The following sections provide examples of various C/C++ constructs and the
1070 debug information that would best describe those constructs.
</p>
1074 <!-- ======================================================================= -->
1075 <div class=
"doc_subsection">
1076 <a name=
"ccxx_compile_units">C/C++ source file information
</a>
1079 <div class=
"doc_text">
1081 <p>Given the source files
<tt>MySource.cpp
</tt> and
<tt>MyHeader.h
</tt> located
1082 in the directory
<tt>/Users/mine/sources
</tt>, the following code:
</p>
1084 <div class=
"doc_code">
1086 #include
"MyHeader.h"
1088 int main(int argc, char *argv[]) {
1094 <p>a C/C++ front-end would generate the following descriptors:
</p>
1096 <div class=
"doc_code">
1100 ;; Define types used. In this case we need one for compile unit anchors and one
1101 ;; for compile units.
1103 %
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a> = type { uint, uint }
1104 %
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a> = type { uint, { }*, uint, uint, i8*, i8*, i8* }
1107 ;; Define the anchor for compile units. Note that the second field of the
1108 ;; anchor is
17, which is the same as the tag for compile units
1109 ;; (
17 = DW_TAG_compile_unit.)
1111 %
<a href=
"#format_compile_units">llvm.dbg.compile_units
</a> = linkonce constant %
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a> { uint
0, uint
17 }, section
"llvm.metadata"
1114 ;; Define the compile unit for the source file
"/Users/mine/sources/MySource.cpp".
1116 %
<a href=
"#format_compile_units">llvm.dbg.compile_unit1
</a> = internal constant %
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a> {
1117 uint add(uint
17, uint
262144),
1118 { }* cast (%
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_units
</a> to { }*),
1121 i8* getelementptr ([
13 x i8]* %str1, i32
0, i32
0),
1122 i8* getelementptr ([
21 x i8]* %str2, i32
0, i32
0),
1123 i8* getelementptr ([
33 x i8]* %str3, i32
0, i32
0) }, section
"llvm.metadata"
1126 ;; Define the compile unit for the header file
"/Users/mine/sources/MyHeader.h".
1128 %
<a href=
"#format_compile_units">llvm.dbg.compile_unit2
</a> = internal constant %
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a> {
1129 uint add(uint
17, uint
262144),
1130 { }* cast (%
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_units
</a> to { }*),
1133 i8* getelementptr ([
11 x i8]* %str4, int
0, int
0),
1134 i8* getelementptr ([
21 x i8]* %str2, int
0, int
0),
1135 i8* getelementptr ([
33 x i8]* %str3, int
0, int
0) }, section
"llvm.metadata"
1138 ;; Define each of the strings used in the compile units.
1140 %str1 = internal constant [
13 x i8] c
"MySource.cpp\00", section
"llvm.metadata";
1141 %str2 = internal constant [
21 x i8] c
"/Users/mine/sources/\00", section
"llvm.metadata";
1142 %str3 = internal constant [
33 x i8] c
"4.0.1 LLVM (LLVM research group)\00", section
"llvm.metadata";
1143 %str4 = internal constant [
11 x i8] c
"MyHeader.h\00", section
"llvm.metadata";
1150 <!-- ======================================================================= -->
1151 <div class=
"doc_subsection">
1152 <a name=
"ccxx_global_variable">C/C++ global variable information
</a>
1155 <div class=
"doc_text">
1157 <p>Given an integer global variable declared as follows:
</p>
1159 <div class=
"doc_code">
1165 <p>a C/C++ front-end would generate the following descriptors:
</p>
1167 <div class=
"doc_code">
1170 ;; Define types used. One for global variable anchors, one for the global
1171 ;; variable descriptor, one for the global's basic type and one for the global's
1174 %
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a> = type { uint, uint }
1175 %
<a href=
"#format_global_variables">llvm.dbg.global_variable.type
</a> = type { uint, { }*, { }*, i8*, { }*, uint, { }*, bool, bool, { }*, uint }
1176 %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> = type { uint, { }*, i8*, { }*, int, uint, uint, uint, uint }
1177 %
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a> = ...
1180 ;; Define the global itself.
1182 %MyGlobal = global int
100
1185 ;; Define the anchor for global variables. Note that the second field of the
1186 ;; anchor is
52, which is the same as the tag for global variables
1187 ;; (
52 = DW_TAG_variable.)
1189 %
<a href=
"#format_global_variables">llvm.dbg.global_variables
</a> = linkonce constant %
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a> { uint
0, uint
52 }, section
"llvm.metadata"
1192 ;; Define the global variable descriptor. Note the reference to the global
1193 ;; variable anchor and the global variable itself.
1195 %
<a href=
"#format_global_variables">llvm.dbg.global_variable
</a> = internal constant %
<a href=
"#format_global_variables">llvm.dbg.global_variable.type
</a> {
1196 uint add(uint
52, uint
262144),
1197 { }* cast (%
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a>* %
<a href=
"#format_global_variables">llvm.dbg.global_variables
</a> to { }*),
1198 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1199 i8* getelementptr ([
9 x i8]* %str1, int
0, int
0),
1200 i8* getelementptr ([
1 x i8]* %str2, int
0, int
0),
1201 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1203 { }* cast (%
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a>* %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> to { }*),
1206 { }* cast (int* %MyGlobal to { }*) }, section
"llvm.metadata"
1209 ;; Define the basic type of
32 bit signed integer. Note that since int is an
1210 ;; intrinsic type the source file is NULL and line
0.
1212 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1213 uint add(uint
36, uint
262144),
1214 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1215 i8* getelementptr ([
4 x i8]* %str3, int
0, int
0),
1221 uint
5 }, section
"llvm.metadata"
1224 ;; Define the names of the global variable and basic type.
1226 %str1 = internal constant [
9 x i8] c
"MyGlobal\00", section
"llvm.metadata"
1227 %str2 = internal constant [
1 x i8] c
"\00", section
"llvm.metadata"
1228 %str3 = internal constant [
4 x i8] c
"int\00", section
"llvm.metadata"
1234 <!-- ======================================================================= -->
1235 <div class=
"doc_subsection">
1236 <a name=
"ccxx_subprogram">C/C++ function information
</a>
1239 <div class=
"doc_text">
1241 <p>Given a function declared as follows:
</p>
1243 <div class=
"doc_code">
1245 int main(int argc, char *argv[]) {
1251 <p>a C/C++ front-end would generate the following descriptors:
</p>
1253 <div class=
"doc_code">
1256 ;; Define types used. One for subprogram anchors, one for the subprogram
1257 ;; descriptor, one for the global's basic type and one for the subprogram's
1260 %
<a href=
"#format_subprograms">llvm.dbg.subprogram.type
</a> = type { uint, { }*, { }*, i8*, { }*, bool, bool }
1261 %
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a> = type { uint, uint }
1262 %
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a> = ...
1265 ;; Define the anchor for subprograms. Note that the second field of the
1266 ;; anchor is
46, which is the same as the tag for subprograms
1267 ;; (
46 = DW_TAG_subprogram.)
1269 %
<a href=
"#format_subprograms">llvm.dbg.subprograms
</a> = linkonce constant %
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a> { uint
0, uint
46 }, section
"llvm.metadata"
1272 ;; Define the descriptor for the subprogram. TODO - more details.
1274 %
<a href=
"#format_subprograms">llvm.dbg.subprogram
</a> = internal constant %
<a href=
"#format_subprograms">llvm.dbg.subprogram.type
</a> {
1275 uint add(uint
46, uint
262144),
1276 { }* cast (%
<a href=
"#format_anchors">llvm.dbg.anchor.type
</a>* %
<a href=
"#format_subprograms">llvm.dbg.subprograms
</a> to { }*),
1277 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1278 i8* getelementptr ([
5 x i8]* %str1, int
0, int
0),
1279 i8* getelementptr ([
1 x i8]* %str2, int
0, int
0),
1280 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1284 bool true }, section
"llvm.metadata"
1287 ;; Define the name of the subprogram.
1289 %str1 = internal constant [
5 x i8] c
"main\00", section
"llvm.metadata"
1290 %str2 = internal constant [
1 x i8] c
"\00", section
"llvm.metadata"
1293 ;; Define the subprogram itself.
1295 int %main(int %argc, i8** %argv) {
1303 <!-- ======================================================================= -->
1304 <div class=
"doc_subsection">
1305 <a name=
"ccxx_basic_types">C/C++ basic types
</a>
1308 <div class=
"doc_text">
1310 <p>The following are the basic type descriptors for C/C++ core types:
</p>
1314 <!-- ======================================================================= -->
1315 <div class=
"doc_subsubsection">
1316 <a name=
"ccxx_basic_type_bool">bool
</a>
1319 <div class=
"doc_text">
1321 <div class=
"doc_code">
1323 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1324 uint add(uint
36, uint
262144),
1325 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1326 i8* getelementptr ([
5 x i8]* %str1, int
0, int
0),
1332 uint
2 }, section
"llvm.metadata"
1333 %str1 = internal constant [
5 x i8] c
"bool\00", section
"llvm.metadata"
1339 <!-- ======================================================================= -->
1340 <div class=
"doc_subsubsection">
1341 <a name=
"ccxx_basic_char">char
</a>
1344 <div class=
"doc_text">
1346 <div class=
"doc_code">
1348 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1349 uint add(uint
36, uint
262144),
1350 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1351 i8* getelementptr ([
5 x i8]* %str1, int
0, int
0),
1357 uint
6 }, section
"llvm.metadata"
1358 %str1 = internal constant [
5 x i8] c
"char\00", section
"llvm.metadata"
1364 <!-- ======================================================================= -->
1365 <div class=
"doc_subsubsection">
1366 <a name=
"ccxx_basic_unsigned_char">unsigned char
</a>
1369 <div class=
"doc_text">
1371 <div class=
"doc_code">
1373 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1374 uint add(uint
36, uint
262144),
1375 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1376 i8* getelementptr ([
14 x i8]* %str1, int
0, int
0),
1382 uint
8 }, section
"llvm.metadata"
1383 %str1 = internal constant [
14 x i8] c
"unsigned char\00", section
"llvm.metadata"
1389 <!-- ======================================================================= -->
1390 <div class=
"doc_subsubsection">
1391 <a name=
"ccxx_basic_short">short
</a>
1394 <div class=
"doc_text">
1396 <div class=
"doc_code">
1398 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1399 uint add(uint
36, uint
262144),
1400 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1401 i8* getelementptr ([
10 x i8]* %str1, int
0, int
0),
1407 uint
5 }, section
"llvm.metadata"
1408 %str1 = internal constant [
10 x i8] c
"short int\00", section
"llvm.metadata"
1414 <!-- ======================================================================= -->
1415 <div class=
"doc_subsubsection">
1416 <a name=
"ccxx_basic_unsigned_short">unsigned short
</a>
1419 <div class=
"doc_text">
1421 <div class=
"doc_code">
1423 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1424 uint add(uint
36, uint
262144),
1425 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1426 i8* getelementptr ([
19 x i8]* %str1, int
0, int
0),
1432 uint
7 }, section
"llvm.metadata"
1433 %str1 = internal constant [
19 x i8] c
"short unsigned int\00", section
"llvm.metadata"
1439 <!-- ======================================================================= -->
1440 <div class=
"doc_subsubsection">
1441 <a name=
"ccxx_basic_int">int
</a>
1444 <div class=
"doc_text">
1446 <div class=
"doc_code">
1448 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1449 uint add(uint
36, uint
262144),
1450 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1451 i8* getelementptr ([
4 x i8]* %str1, int
0, int
0),
1457 uint
5 }, section
"llvm.metadata"
1458 %str1 = internal constant [
4 x i8] c
"int\00", section
"llvm.metadata"
1463 <!-- ======================================================================= -->
1464 <div class=
"doc_subsubsection">
1465 <a name=
"ccxx_basic_unsigned_int">unsigned int
</a>
1468 <div class=
"doc_text">
1470 <div class=
"doc_code">
1472 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1473 uint add(uint
36, uint
262144),
1474 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1475 i8* getelementptr ([
13 x i8]* %str1, int
0, int
0),
1481 uint
7 }, section
"llvm.metadata"
1482 %str1 = internal constant [
13 x i8] c
"unsigned int\00", section
"llvm.metadata"
1488 <!-- ======================================================================= -->
1489 <div class=
"doc_subsubsection">
1490 <a name=
"ccxx_basic_long_long">long long
</a>
1493 <div class=
"doc_text">
1495 <div class=
"doc_code">
1497 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1498 uint add(uint
36, uint
262144),
1499 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1500 i8* getelementptr ([
14 x i8]* %str1, int
0, int
0),
1506 uint
5 }, section
"llvm.metadata"
1507 %str1 = internal constant [
14 x i8] c
"long long int\00", section
"llvm.metadata"
1513 <!-- ======================================================================= -->
1514 <div class=
"doc_subsubsection">
1515 <a name=
"ccxx_basic_unsigned_long_long">unsigned long long
</a>
1518 <div class=
"doc_text">
1520 <div class=
"doc_code">
1522 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1523 uint add(uint
36, uint
262144),
1524 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1525 i8* getelementptr ([
23 x i8]* %str1, int
0, int
0),
1531 uint
7 }, section
"llvm.metadata"
1532 %str1 = internal constant [
23 x
8] c
"long long unsigned int\00", section
"llvm.metadata"
1538 <!-- ======================================================================= -->
1539 <div class=
"doc_subsubsection">
1540 <a name=
"ccxx_basic_float">float
</a>
1543 <div class=
"doc_text">
1545 <div class=
"doc_code">
1547 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1548 uint add(uint
36, uint
262144),
1549 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1550 i8* getelementptr ([
6 x i8]* %str1, int
0, int
0),
1556 uint
4 }, section
"llvm.metadata"
1557 %str1 = internal constant [
6 x i8] c
"float\00", section
"llvm.metadata"
1563 <!-- ======================================================================= -->
1564 <div class=
"doc_subsubsection">
1565 <a name=
"ccxx_basic_double">double
</a>
1568 <div class=
"doc_text">
1570 <div class=
"doc_code">
1572 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1573 uint add(uint
36, uint
262144),
1574 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1575 8* getelementptr ([
7 x
8]* %str1, int
0, int
0),
1581 uint
4 }, section
"llvm.metadata"
1582 %str1 = internal constant [
7 x
8] c
"double\00", section
"llvm.metadata"
1588 <!-- ======================================================================= -->
1589 <div class=
"doc_subsection">
1590 <a name=
"ccxx_derived_types">C/C++ derived types
</a>
1593 <div class=
"doc_text">
1595 <p>Given the following as an example of C/C++ derived type:
</p>
1597 <div class=
"doc_code">
1599 typedef const int *IntPtr;
1603 <p>a C/C++ front-end would generate the following descriptors:
</p>
1605 <div class=
"doc_code">
1608 ;; Define the typedef
"IntPtr".
1610 %
<a href=
"#format_derived_type">llvm.dbg.derivedtype1
</a> = internal constant %
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a> {
1611 uint add(uint
22, uint
262144),
1612 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1613 i8* getelementptr ([
7 x
8]* %str1, int
0, int
0),
1614 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1619 { }* cast (%
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a>* %
<a href=
"#format_derived_type">llvm.dbg.derivedtype2
</a> to { }*) }, section
"llvm.metadata"
1620 %str1 = internal constant [
7 x
8] c
"IntPtr\00", section
"llvm.metadata"
1623 ;; Define the pointer type.
1625 %
<a href=
"#format_derived_type">llvm.dbg.derivedtype2
</a> = internal constant %
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a> {
1626 uint add(uint
15, uint
262144),
1627 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1634 { }* cast (%
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a>* %
<a href=
"#format_derived_type">llvm.dbg.derivedtype3
</a> to { }*) }, section
"llvm.metadata"
1637 ;; Define the const type.
1639 %
<a href=
"#format_derived_type">llvm.dbg.derivedtype3
</a> = internal constant %
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a> {
1640 uint add(uint
38, uint
262144),
1641 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1648 { }* cast (%
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a>* %
<a href=
"#format_basic_type">llvm.dbg.basictype1
</a> to { }*) }, section
"llvm.metadata"
1651 ;; Define the int type.
1653 %
<a href=
"#format_basic_type">llvm.dbg.basictype1
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1654 uint add(uint
36, uint
262144),
1655 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1656 8* getelementptr ([
4 x
8]* %str2, int
0, int
0),
1662 uint
5 }, section
"llvm.metadata"
1663 %str2 = internal constant [
4 x
8] c
"int\00", section
"llvm.metadata"
1669 <!-- ======================================================================= -->
1670 <div class=
"doc_subsection">
1671 <a name=
"ccxx_composite_types">C/C++ struct/union types
</a>
1674 <div class=
"doc_text">
1676 <p>Given the following as an example of C/C++ struct type:
</p>
1678 <div class=
"doc_code">
1688 <p>a C/C++ front-end would generate the following descriptors:
</p>
1690 <div class=
"doc_code">
1693 ;; Define basic type for unsigned int.
1695 %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> = internal constant %
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a> {
1696 uint add(uint
36, uint
262144),
1697 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1698 i8* getelementptr ([
13 x i8]* %str1, int
0, int
0),
1704 uint
7 }, section
"llvm.metadata"
1705 %str1 = internal constant [
13 x i8] c
"unsigned int\00", section
"llvm.metadata"
1708 ;; Define composite type for struct Color.
1710 %
<a href=
"#format_composite_type">llvm.dbg.compositetype
</a> = internal constant %
<a href=
"#format_composite_type">llvm.dbg.compositetype.type
</a> {
1711 uint add(uint
19, uint
262144),
1712 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1713 i8* getelementptr ([
6 x i8]* %str2, int
0, int
0),
1714 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1720 { }* cast ([
3 x { }*]* %llvm.dbg.array to { }*) }, section
"llvm.metadata"
1721 %str2 = internal constant [
6 x i8] c
"Color\00", section
"llvm.metadata"
1724 ;; Define the Red field.
1726 %
<a href=
"#format_derived_type">llvm.dbg.derivedtype1
</a> = internal constant %
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a> {
1727 uint add(uint
13, uint
262144),
1729 i8* getelementptr ([
4 x i8]* %str3, int
0, int
0),
1730 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1735 { }* cast (%
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a>* %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> to { }*) }, section
"llvm.metadata"
1736 %str3 = internal constant [
4 x i8] c
"Red\00", section
"llvm.metadata"
1739 ;; Define the Green field.
1741 %
<a href=
"#format_derived_type">llvm.dbg.derivedtype2
</a> = internal constant %
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a> {
1742 uint add(uint
13, uint
262144),
1744 i8* getelementptr ([
6 x i8]* %str4, int
0, int
0),
1745 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1750 { }* cast (%
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a>* %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> to { }*) }, section
"llvm.metadata"
1751 %str4 = internal constant [
6 x i8] c
"Green\00", section
"llvm.metadata"
1754 ;; Define the Blue field.
1756 %
<a href=
"#format_derived_type">llvm.dbg.derivedtype3
</a> = internal constant %
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a> {
1757 uint add(uint
13, uint
262144),
1759 i8* getelementptr ([
5 x i8]* %str5, int
0, int
0),
1760 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1765 { }* cast (%
<a href=
"#format_basic_type">llvm.dbg.basictype.type
</a>* %
<a href=
"#format_basic_type">llvm.dbg.basictype
</a> to { }*) }, section
"llvm.metadata"
1766 %str5 = internal constant [
5 x
8] c
"Blue\00", section
"llvm.metadata"
1769 ;; Define the array of fields used by the composite type Color.
1771 %llvm.dbg.array = internal constant [
3 x { }*] [
1772 { }* cast (%
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a>* %
<a href=
"#format_derived_type">llvm.dbg.derivedtype1
</a> to { }*),
1773 { }* cast (%
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a>* %
<a href=
"#format_derived_type">llvm.dbg.derivedtype2
</a> to { }*),
1774 { }* cast (%
<a href=
"#format_derived_type">llvm.dbg.derivedtype.type
</a>* %
<a href=
"#format_derived_type">llvm.dbg.derivedtype3
</a> to { }*) ], section
"llvm.metadata"
1780 <!-- ======================================================================= -->
1781 <div class=
"doc_subsection">
1782 <a name=
"ccxx_enumeration_types">C/C++ enumeration types
</a>
1785 <div class=
"doc_text">
1787 <p>Given the following as an example of C/C++ enumeration type:
</p>
1789 <div class=
"doc_code">
1799 <p>a C/C++ front-end would generate the following descriptors:
</p>
1801 <div class=
"doc_code">
1804 ;; Define composite type for enum Trees
1806 %
<a href=
"#format_composite_type">llvm.dbg.compositetype
</a> = internal constant %
<a href=
"#format_composite_type">llvm.dbg.compositetype.type
</a> {
1807 uint add(uint
4, uint
262144),
1808 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1809 i8* getelementptr ([
6 x i8]* %str1, int
0, int
0),
1810 { }* cast (%
<a href=
"#format_compile_units">llvm.dbg.compile_unit.type
</a>* %
<a href=
"#format_compile_units">llvm.dbg.compile_unit
</a> to { }*),
1816 { }* cast ([
3 x { }*]* %llvm.dbg.array to { }*) }, section
"llvm.metadata"
1817 %str1 = internal constant [
6 x i8] c
"Trees\00", section
"llvm.metadata"
1820 ;; Define Spruce enumerator.
1822 %
<a href=
"#format_enumeration">llvm.dbg.enumerator1
</a> = internal constant %
<a href=
"#format_enumeration">llvm.dbg.enumerator.type
</a> {
1823 uint add(uint
40, uint
262144),
1824 i8* getelementptr ([
7 x i8]* %str2, int
0, int
0),
1825 int
100 }, section
"llvm.metadata"
1826 %str2 = internal constant [
7 x i8] c
"Spruce\00", section
"llvm.metadata"
1829 ;; Define Oak enumerator.
1831 %
<a href=
"#format_enumeration">llvm.dbg.enumerator2
</a> = internal constant %
<a href=
"#format_enumeration">llvm.dbg.enumerator.type
</a> {
1832 uint add(uint
40, uint
262144),
1833 i8* getelementptr ([
4 x i8]* %str3, int
0, int
0),
1834 int
200 }, section
"llvm.metadata"
1835 %str3 = internal constant [
4 x i8] c
"Oak\00", section
"llvm.metadata"
1838 ;; Define Maple enumerator.
1840 %
<a href=
"#format_enumeration">llvm.dbg.enumerator3
</a> = internal constant %
<a href=
"#format_enumeration">llvm.dbg.enumerator.type
</a> {
1841 uint add(uint
40, uint
262144),
1842 i8* getelementptr ([
6 x i8]* %str4, int
0, int
0),
1843 int
300 }, section
"llvm.metadata"
1844 %str4 = internal constant [
6 x i8] c
"Maple\00", section
"llvm.metadata"
1847 ;; Define the array of enumerators used by composite type Trees.
1849 %llvm.dbg.array = internal constant [
3 x { }*] [
1850 { }* cast (%
<a href=
"#format_enumeration">llvm.dbg.enumerator.type
</a>* %
<a href=
"#format_enumeration">llvm.dbg.enumerator1
</a> to { }*),
1851 { }* cast (%
<a href=
"#format_enumeration">llvm.dbg.enumerator.type
</a>* %
<a href=
"#format_enumeration">llvm.dbg.enumerator2
</a> to { }*),
1852 { }* cast (%
<a href=
"#format_enumeration">llvm.dbg.enumerator.type
</a>* %
<a href=
"#format_enumeration">llvm.dbg.enumerator3
</a> to { }*) ], section
"llvm.metadata"
1858 <!-- *********************************************************************** -->
1862 <a href=
"http://jigsaw.w3.org/css-validator/check/referer"><img
1863 src=
"http://jigsaw.w3.org/css-validator/images/vcss-blue" alt=
"Valid CSS"></a>
1864 <a href=
"http://validator.w3.org/check/referer"><img
1865 src=
"http://www.w3.org/Icons/valid-html401-blue" alt=
"Valid HTML 4.01"></a>
1867 <a href=
"mailto:sabre@nondot.org">Chris Lattner
</a><br>
1868 <a href=
"http://llvm.org">LLVM Compiler Infrastructure
</a><br>
1869 Last modified: $Date$