summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker/thinlto_funcimport_debug.ll
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-01-25 22:04:56 +0000
committerTeresa Johnson <tejohnson@google.com>2016-01-25 22:04:56 +0000
commit71d12d2a4efd17a286f3050410433d6c8a2c6005 (patch)
tree9777695aa654575c2fdf6a5a54e0a4f3c69df0aa /llvm/test/Linker/thinlto_funcimport_debug.ll
parent392443879dce3a2244a2529ee1c058f1777c6945 (diff)
downloadbcm5719-llvm-71d12d2a4efd17a286f3050410433d6c8a2c6005.tar.gz
bcm5719-llvm-71d12d2a4efd17a286f3050410433d6c8a2c6005.zip
[ThinLTO] Find all needed metadata when linking metadata as postpass
For metadata postpass linking, after importing all functions, we need to recursively walk through any nodes reached via imported functions to locate needed subprogram metadata. Some might only be reached indirectly via the variable list for an inlined function. llvm-svn: 258728
Diffstat (limited to 'llvm/test/Linker/thinlto_funcimport_debug.ll')
-rw-r--r--llvm/test/Linker/thinlto_funcimport_debug.ll16
1 files changed, 13 insertions, 3 deletions
diff --git a/llvm/test/Linker/thinlto_funcimport_debug.ll b/llvm/test/Linker/thinlto_funcimport_debug.ll
index 02f43b24c17..0e26a33375a 100644
--- a/llvm/test/Linker/thinlto_funcimport_debug.ll
+++ b/llvm/test/Linker/thinlto_funcimport_debug.ll
@@ -18,6 +18,8 @@
; CHECK: distinct !DISubprogram(name: "func1"
; CHECK-NOT: distinct !DISubprogram(name: "func2"
+; CHECK: distinct !DISubprogram(name: "func3"
+; CHECK: distinct !DISubprogram(name: "func4"
; ModuleID = 'dbg.o'
@@ -55,7 +57,7 @@ attributes #1 = { nounwind readnone }
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: 1, enums: !2, subprograms: !3)
!1 = !DIFile(filename: "dbg.c", directory: ".")
!2 = !{}
-!3 = !{!4, !11}
+!3 = !{!4, !11, !27, !30}
!4 = distinct !DISubprogram(name: "func1", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !8)
!5 = !DISubroutineType(types: !6)
!6 = !{!7, !7}
@@ -72,9 +74,17 @@ attributes #1 = { nounwind readnone }
!17 = !DIExpression()
!18 = !DILocation(line: 1, column: 15, scope: !4)
!19 = !DILocation(line: 2, column: 7, scope: !4)
-!20 = !DILocation(line: 3, column: 9, scope: !21)
-!21 = distinct !DILexicalBlock(scope: !4, file: !1, line: 3, column: 7)
+!20 = !DILocation(line: 3, column: 9, scope: !21, inlinedAt: !26)
+!21 = distinct !DILexicalBlock(scope: !27, file: !1, line: 3, column: 7)
!22 = !DILocation(line: 3, column: 7, scope: !4)
!23 = !DILocation(line: 5, column: 3, scope: !4)
!24 = !DILocation(line: 8, column: 15, scope: !11)
!25 = !DILocation(line: 9, column: 3, scope: !11)
+!26 = !DILocation(line: 9, column: 3, scope: !4)
+!27 = distinct !DISubprogram(name: "func3", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, variables: !28)
+!28 = !{!29}
+!29 = !DILocalVariable(name: "n", arg: 1, scope: !30, file: !1, line: 8, type: !7)
+!30 = distinct !DISubprogram(name: "func4", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, variables: !31)
+!31 = !{!32}
+!32 = !DILocalVariable(name: "n", arg: 1, scope: !30, file: !1, line: 8, type: !7)
+
OpenPOWER on IntegriCloud