summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/Generic/nodebug.ll
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-04-09 18:10:22 +0000
committerAdrian Prantl <aprantl@apple.com>2016-04-09 18:10:22 +0000
commit3891e9e859e76dec82f88a9ed902fe7e016147cd (patch)
treeda3080840db67a29d4270cced162335e3c3ea913 /llvm/test/DebugInfo/Generic/nodebug.ll
parent4abae4e0faea4930ca7d941358ba535835cba1c0 (diff)
downloadbcm5719-llvm-3891e9e859e76dec82f88a9ed902fe7e016147cd.tar.gz
bcm5719-llvm-3891e9e859e76dec82f88a9ed902fe7e016147cd.zip
Drop debug info for DISubprograms that are not referenced by anything
This patch drops the debug info for all DISubprograms that are (a) not attached to an llvm::Function and (b) not indirectly reachable via inline scopes from any surviving Function and (c) not reachable from a type (i.e.: member functions). Background: I'm currently working on a patch to reverse the pointers between DICompileUnit and DISubprogram (for more info check Duncan's RFC on lazy-loading of debug info metadata http://lists.llvm.org/pipermail/llvm-dev/2016-March/097419.html). The idea is to remove the list of subprograms from DICompileUnit and instead point to the owning compile unit from each DISubprogram. After doing this all DISubprograms fulfilling the above criteria will be implicitly dropped unless we go through an extra effort to preserve them. http://reviews.llvm.org/D18477 <rdar://problem/25256815> llvm-svn: 265876
Diffstat (limited to 'llvm/test/DebugInfo/Generic/nodebug.ll')
-rw-r--r--llvm/test/DebugInfo/Generic/nodebug.ll6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/test/DebugInfo/Generic/nodebug.ll b/llvm/test/DebugInfo/Generic/nodebug.ll
index 35da65d3b8b..aa7f85a91a6 100644
--- a/llvm/test/DebugInfo/Generic/nodebug.ll
+++ b/llvm/test/DebugInfo/Generic/nodebug.ll
@@ -16,10 +16,8 @@
; f1();
; }
-; Check that there's only one DW_TAG_subprogram, nothing for the 'f2' function.
-; CHECK: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name {{.*}} "f1"
+; Check that there's no DW_TAG_subprogram, not even for the 'f2' function.
+; CHECK: DW_TAG_compile_unit
; CHECK-NOT: DW_TAG_subprogram
@i = external global i32
OpenPOWER on IntegriCloud