aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-10-27 04:50:34 +0000
committerBill Wendling <isanbard@gmail.com>2013-10-27 04:50:34 +0000
commit1a57aa436733dc5eca5ef71a2fab39a58f627704 (patch)
tree8ec9b13923c120adfd589f5ecf2ce5108b8e9900 /docs
parent4d7f7b1bbb1a6522c41b1bb894ece037e6cadc92 (diff)
downloadexternal_llvm-1a57aa436733dc5eca5ef71a2fab39a58f627704.zip
external_llvm-1a57aa436733dc5eca5ef71a2fab39a58f627704.tar.gz
external_llvm-1a57aa436733dc5eca5ef71a2fab39a58f627704.tar.bz2
Update to current output.
PR14039 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/SourceLevelDebugging.rst129
1 files changed, 65 insertions, 64 deletions
diff --git a/docs/SourceLevelDebugging.rst b/docs/SourceLevelDebugging.rst
index e62e89d..05ac09c 100644
--- a/docs/SourceLevelDebugging.rst
+++ b/docs/SourceLevelDebugging.rst
@@ -650,85 +650,86 @@ Compiled to LLVM, this function would be represented like this:
.. code-block:: llvm
- define void @_Z3foov() #0 {
+ define void @foo() #0 {
entry:
- %X = alloca i32, align 4 ; [#uses=3 type=i32*]
- %Y = alloca i32, align 4 ; [#uses=2 type=i32*]
- %Z = alloca i32, align 4 ; [#uses=2 type=i32*]
- call void @llvm.dbg.declare(metadata !{i32* %X}, metadata !8), !dbg !10
+ %X = alloca i32, align 4
+ %Y = alloca i32, align 4
+ %Z = alloca i32, align 4
+ call void @llvm.dbg.declare(metadata !{i32* %X}, metadata !10), !dbg !12
; [debug line = 2:7] [debug variable = X]
- store i32 21, i32* %X, align 4, !dbg !11 ; [debug line = 2:13]
- call void @llvm.dbg.declare(metadata !{i32* %Y}, metadata !12), !dbg !13
+ store i32 21, i32* %X, align 4, !dbg !12
+ call void @llvm.dbg.declare(metadata !{i32* %Y}, metadata !13), !dbg !14
; [debug line = 3:7] [debug variable = Y]
- store i32 22, i32* %Y, align 4, !dbg !14 ; [debug line = 3:13]
+ store i32 22, i32* %Y, align 4, !dbg !14
call void @llvm.dbg.declare(metadata !{i32* %Z}, metadata !15), !dbg !17
; [debug line = 5:9] [debug variable = Z]
- store i32 23, i32* %Z, align 4, !dbg !18 ; [debug line = 5:15]
- %0 = load i32* %X, align 4, !dbg !19 ; [#uses=1 type=i32] \
+ store i32 23, i32* %Z, align 4, !dbg !17
+ %0 = load i32* %X, align 4, !dbg !18
[debug line = 6:5]
- store i32 %0, i32* %Z, align 4, !dbg !19 ; [debug line = 6:5]
- %1 = load i32* %Y, align 4, !dbg !20 ; [#uses=1 type=i32] \
+ store i32 %0, i32* %Z, align 4, !dbg !18
+ %1 = load i32* %Y, align 4, !dbg !19
[debug line = 8:3]
- store i32 %1, i32* %X, align 4, !dbg !20 ; [debug line = 8:3]
- ret void, !dbg !21 ; [debug line = 9:1]
+ store i32 %1, i32* %X, align 4, !dbg !19
+ ret void, !dbg !20
}
- ; [#uses=3]
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata) #1
- attributes #0 = { optsize zeroext "less-precise-fpmad"="false"
- "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true"
- "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false"
+ attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false"
+ "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"
+ "no-infs-fp-math"="false" "no-nans-fp-math"="false"
+ "stack-protector-buffer-size"="8" "unsafe-fp-math"="false"
"use-soft-float"="false" }
attributes #1 = { nounwind readnone }
!llvm.dbg.cu = !{!0}
-
+ !llvm.module.flags = !{!8}
+ !llvm.ident = !{!9}
+
!0 = metadata !{i32 786449, metadata !1, i32 12,
- metadata !"clang version 3.4 ", i1 false, metadata !"", i32 0,
- metadata !2, metadata !2, metadata !3, metadata !2,
- metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] \
+ metadata !"clang version 3.4 (trunk 193128) (llvm/trunk 193139)",
+ i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !3,
+ metadata !2, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] \
[/private/tmp/foo.c] \
- [DW_LANG_C]
- !1 = metadata !{metadata !"foo.c", metadata !"/private/tmp"}
+ [DW_LANG_C99]
+ !1 = metadata !{metadata !"t.c", metadata !"/private/tmp"}
!2 = metadata !{i32 0}
!3 = metadata !{metadata !4}
!4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"foo",
- metadata !"foo", metadata !"_Z3foov", i32 1, metadata !6,
- i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false,
- void ()* @_Z3foov, null, null, metadata !2, i32 1}
+ metadata !"foo", metadata !"", i32 1, metadata !6,
+ i1 false, i1 true, i32 0, i32 0, null, i32 0, i1 false,
+ void ()* @foo, null, null, metadata !2, i32 1}
; [ DW_TAG_subprogram ] [line 1] [def] [foo]
- !5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] \
- [/private/tmp/foo.c]
- !6 = metadata !{i32 786453, i32 0, i32 0, metadata !"", i32 0, i64 0, i64 0,
- i64 0, i32 0, null, metadata !7, i32 0, i32 0}
+ !5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] \
+ [/private/tmp/t.c]
+ !6 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0,
+ i64 0, i32 0, null, metadata !7, i32 0, null, null, null}
; [ DW_TAG_subroutine_type ] \
[line 0, size 0, align 0, offset 0] [from ]
!7 = metadata !{null}
- !8 = metadata !{i32 786688, metadata !4, metadata !"X", metadata !5, i32 2, \
- metadata !9, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [X] \
- [line 2]
- !9 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, \
- i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] \
- [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
- !10 = metadata !{i32 2, i32 7, metadata !4, null}
- !11 = metadata !{i32 2, i32 13, metadata !4, null}
- !12 = metadata !{i32 786688, metadata !4, metadata !"Y", metadata !5, i32 3, \
- metadata !9, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [Y] \
+ !8 = metadata !{i32 2, metadata !"Dwarf Version", i32 2}
+ !9 = metadata !{metadata !"clang version 3.4 (trunk 193128) (llvm/trunk 193139)"}
+ !10 = metadata !{i32 786688, metadata !4, metadata !"X", metadata !5, i32 2,
+ metadata !11, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [X] \
+ [line 2]
+ !11 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32,
+ i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] \
+ [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
+ !12 = metadata !{i32 2, i32 0, metadata !4, null}
+ !13 = metadata !{i32 786688, metadata !4, metadata !"Y", metadata !5, i32 3,
+ metadata !11, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [Y] \
[line 3]
- !13 = metadata !{i32 3, i32 7, metadata !4, null}
- !14 = metadata !{i32 3, i32 13, metadata !4, null}
- !15 = metadata !{i32 786688, metadata !16, metadata !"Z", metadata !5, i32 5, \
- metadata !9, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [Z] \
+ !14 = metadata !{i32 3, i32 0, metadata !4, null}
+ !15 = metadata !{i32 786688, metadata !16, metadata !"Z", metadata !5, i32 5,
+ metadata !11, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [Z] \
[line 5]
- !16 = metadata !{i32 786443, metadata !1, metadata !4, i32 4, i32 3, i32 0}
- ; [ DW_TAG_lexical_block ] [/private/tmp/foo.c]
- !17 = metadata !{i32 5, i32 9, metadata !16, null}
- !18 = metadata !{i32 5, i32 15, metadata !16, null}
- !19 = metadata !{i32 6, i32 5, metadata !16, null}
- !20 = metadata !{i32 8, i32 3, metadata !4, null}
- !21 = metadata !{i32 9, i32 1, metadata !4, null}
+ !16 = metadata !{i32 786443, metadata !1, metadata !4, i32 4, i32 0, i32 0} \
+ ; [ DW_TAG_lexical_block ] [/private/tmp/t.c]
+ !17 = metadata !{i32 5, i32 0, metadata !16, null}
+ !18 = metadata !{i32 6, i32 0, metadata !16, null}
+ !19 = metadata !{i32 8, i32 0, metadata !4, null} ; [ DW_TAG_imported_declaration ]
+ !20 = metadata !{i32 9, i32 0, metadata !4, null}
This example illustrates a few important details about LLVM debugging
information. In particular, it shows how the ``llvm.dbg.declare`` intrinsic and
@@ -738,23 +739,23 @@ variable definitions, and the code used to implement the function.
.. code-block:: llvm
- call void @llvm.dbg.declare(metadata !{i32* %X}, metadata !8), !dbg !10
+ call void @llvm.dbg.declare(metadata !{i32* %X}, metadata !10), !dbg !12
; [debug line = 2:7] [debug variable = X]
The first intrinsic ``%llvm.dbg.declare`` encodes debugging information for the
-variable ``X``. The metadata ``!dbg !10`` attached to the intrinsic provides
+variable ``X``. The metadata ``!dbg !12`` attached to the intrinsic provides
scope information for the variable ``X``.
.. code-block:: llvm
- !10 = metadata !{i32 2, i32 7, metadata !4, null}
+ !12 = metadata !{i32 2, i32 0, metadata !4, null}
!4 = metadata !{i32 786478, metadata !1, metadata !5, metadata !"foo",
- metadata !"foo", metadata !"_Z3foov", i32 1, metadata !6,
- i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false,
- void ()* @_Z3foov, null, null, metadata !2, i32 1}
- ; [ DW_TAG_subprogram ] [line 1] [def] [foo]
+ metadata !"foo", metadata !"", i32 1, metadata !6,
+ i1 false, i1 true, i32 0, i32 0, null, i32 0, i1 false,
+ void ()* @foo, null, null, metadata !2, i32 1}
+ ; [ DW_TAG_subprogram ] [line 1] [def] [foo]
-Here ``!10`` is metadata providing location information. It has four fields:
+Here ``!12`` is metadata providing location information. It has four fields:
line number, column number, scope, and original scope. The original scope
represents inline location if this instruction is inlined inside a caller, and
is null otherwise. In this example, scope is encoded by ``!4``, a
@@ -775,12 +776,12 @@ scope information for the variable ``Z``.
.. code-block:: llvm
- !16 = metadata !{i32 786443, metadata !1, metadata !4, i32 4, i32 3, i32 0}
- ; [ DW_TAG_lexical_block ] [/private/tmp/foo.c]
- !17 = metadata !{i32 5, i32 9, metadata !16, null}
+ !16 = metadata !{i32 786443, metadata !1, metadata !4, i32 4, i32 0, i32 0}
+ ; [ DW_TAG_lexical_block ] [/private/tmp/t.c]
+ !17 = metadata !{i32 5, i32 0, metadata !16, null}
Here ``!15`` indicates that ``Z`` is declared at line number 5 and
-column number 9 inside of lexical scope ``!16``. The lexical scope itself
+column number 0 inside of lexical scope ``!16``. The lexical scope itself
resides inside of subprogram ``!4`` described above.
The scope information attached with each instruction provides a straightforward