forked from OSchip/llvm-project
DebugInfo: Assume the CU's Subprogram list only contains definitions.
DIBuilder maintains this invariant and the current DwarfDebug code could end up doing weird things if it contained declarations (such as putting the definition DIE inside a CU that contained the declaration - this doesn't seem like a good idea, so rather than adding logic to handle this case we'll just ban in for now & cross that bridge if we come to it later). llvm-svn: 209004
This commit is contained in:
parent
36132035ca
commit
825f487b68
|
@ -718,10 +718,7 @@ void DwarfDebug::constructSubprogramDIE(DwarfCompileUnit &TheCU,
|
|||
|
||||
DISubprogram SP(N);
|
||||
assert(SP.isSubprogram());
|
||||
if (!SP.isDefinition())
|
||||
// This is a method declaration which will be handled while constructing
|
||||
// class type.
|
||||
return;
|
||||
assert(SP.isDefinition());
|
||||
|
||||
DIE &SubprogramDie = *TheCU.getOrCreateSubprogramDIE(SP);
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
|
|||
!43 = metadata !{i32 26, i32 0, metadata !39, null}
|
||||
!44 = metadata !{i32 786688, metadata !39, metadata !"k", metadata !2, i32 26, metadata !13, i32 0, i32 0} ; [ DW_TAG_auto_variable ]
|
||||
!45 = metadata !{i32 27, i32 0, metadata !39, null}
|
||||
!46 = metadata !{metadata !0, metadata !9, metadata !16, metadata !17, metadata !20}
|
||||
!46 = metadata !{metadata !16, metadata !17, metadata !20}
|
||||
!47 = metadata !{}
|
||||
!48 = metadata !{metadata !"small.cc", metadata !"/Users/manav/R8248330"}
|
||||
!49 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
|
||||
|
|
|
@ -76,7 +76,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
|
|||
|
||||
!llvm.dbg.cu = !{!3}
|
||||
!llvm.module.flags = !{!49}
|
||||
!46 = metadata !{metadata !0, metadata !9, metadata !16, metadata !17, metadata !20}
|
||||
!46 = metadata !{metadata !16, metadata !17, metadata !20}
|
||||
|
||||
!0 = metadata !{i32 786478, metadata !47, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"", i32 11, metadata !14, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null, null, null, null, i32 11} ; [ DW_TAG_subprogram ]
|
||||
!1 = metadata !{i32 786451, metadata !47, metadata !2, metadata !"SVal", i32 1, i64 128, i64 64, i64 0, i32 0, null, metadata !4, i32 0, null, null, null} ; [ DW_TAG_structure_type ] [SVal] [line 1, size 128, align 64, offset 0] [def] [from ]
|
||||
|
|
|
@ -25,6 +25,6 @@ entry:
|
|||
!10 = metadata !{i32 524299, metadata !12, metadata !0, i32 3, i32 11, i32 0} ; [ DW_TAG_lexical_block ]
|
||||
!11 = metadata !{i32 524334, metadata !12, metadata !1, metadata !"foo", metadata !"foo", metadata !"foo", i32 7, metadata !3, i1 true, i1 false, i32 0, i32 0, null, i1 false, i1 true, null, null, null, null, i32 0} ; [ DW_TAG_subprogram ]
|
||||
!12 = metadata !{metadata !"one.c", metadata !"/private/tmp"}
|
||||
!13 = metadata !{metadata !0, metadata !6, metadata !11}
|
||||
!13 = metadata !{metadata !0}
|
||||
!14 = metadata !{i32 0}
|
||||
!15 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
|
||||
|
|
|
@ -122,6 +122,6 @@ entry:
|
|||
!47 = metadata !{i32 2, i32 47, metadata !25, null}
|
||||
!48 = metadata !{i32 2, i32 54, metadata !49, null}
|
||||
!49 = metadata !{i32 786443, metadata !51, metadata !25, i32 2, i32 52, i32 2} ; [ DW_TAG_lexical_block ]
|
||||
!50 = metadata !{metadata !0, metadata !10, metadata !14, metadata !19, metadata !22, metadata !25}
|
||||
!50 = metadata !{metadata !19, metadata !22, metadata !25}
|
||||
!51 = metadata !{metadata !"a.cc", metadata !"/private/tmp"}
|
||||
!52 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
|
||||
|
|
Loading…
Reference in New Issue