diff options
| author | Keno Fischer <keno@alumni.harvard.edu> | 2017-04-11 13:32:11 +0000 |
|---|---|---|
| committer | Keno Fischer <keno@alumni.harvard.edu> | 2017-04-11 13:32:11 +0000 |
| commit | 30779772cfaa007cad187d81369714e83d3a213a (patch) | |
| tree | 84caf9eefb260636511f3adb65e5e70c49c14f04 /llvm/test/Transforms | |
| parent | 4714f7cba93b83dca7feb0d4bf13e7b4412c27b3 (diff) | |
| download | bcm5719-llvm-30779772cfaa007cad187d81369714e83d3a213a.tar.gz bcm5719-llvm-30779772cfaa007cad187d81369714e83d3a213a.zip | |
[StripDeadDebug/DIFinder] Track inlined SPs
Summary:
In rL299692 I improved strip-dead-debug-info's ability to drop CUs that are not
referenced from the current module. However, in doing so I neglected to realize
that some SPs could be referenced entirely from inlined functions. It appears
I was not the only one to make this mistake, because DebugInfoFinder, doesn't
find those SPs either. Fix this in DebugInfoFinder and then use that to make
sure not to drop those CUs in strip-dead-debug-info.
Reviewers: aprantl
Reviewed By: aprantl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31904
llvm-svn: 299936
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll b/llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll index eb8ff50137c..d18c07d54a9 100644 --- a/llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll +++ b/llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll @@ -24,7 +24,7 @@ entry: define i32 @foo(i32 %i) #2 !dbg !15 { entry: tail call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !18, metadata !19), !dbg !20 - %.0 = load i32, i32* @xyz, align 4 + %.0 = load i32, i32* @xyz, align 4, !dbg !30 ret i32 %.0, !dbg !21 } @@ -32,7 +32,7 @@ attributes #0 = { nounwind readnone } attributes #1 = { nounwind readnone ssp } attributes #2 = { nounwind readonly ssp } -!llvm.dbg.cu = !{!4, !23, !24} +!llvm.dbg.cu = !{!4, !23, !24, !28} !llvm.module.flags = !{!9} !0 = !DIGlobalVariableExpression(var: !1) @@ -63,3 +63,6 @@ attributes #2 = { nounwind readonly ssp } !25 = !{!26} !26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression(DW_OP_constu, 0, DW_OP_stack_value)) !27 = !DIGlobalVariable(name: "abcd2", scope: !2, file: !2, line: 2, type: !3, isLocal: true, isDefinition: true) +!28 = distinct !DICompileUnit(language: DW_LANG_C89, file: !2, producer: "InlineTest", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !5) +!29 = distinct !DISubprogram(name: "inlinefunc", linkageName: "inlinefunc", scope: null, file: !2, line: 7, type: !16, isLocal: false, isDefinition: true, isOptimized: true, unit: !28) +!30 = !DILocation(line: 100, scope: !29, inlinedAt: !21) |

