diff options
Diffstat (limited to 'llvm/test/DebugInfo')
| -rw-r--r-- | llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll | 24 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/Generic/nodebug.ll | 6 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/debug-dead-local-var.ll | 9 |
3 files changed, 16 insertions, 23 deletions
diff --git a/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll b/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll index b649ba662b1..875c39862dc 100644 --- a/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll +++ b/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll @@ -26,24 +26,16 @@ ; } ; int (*y)(int) = &func; +; The DISubprogram should show up in compile unit a. ; CHECK: DW_TAG_compile_unit -; CHECK: DW_TAG_subprogram ; CHECK-NOT: DW_TAG -; CHECK: DW_AT_name {{.*}} "func" -; CHECK: DW_TAG_compile_unit - -; FIXME: Maybe we should drop the subprogram here - since the function was -; emitted in one CU, due to linkonce_odr uniquing. We certainly don't emit the -; subprogram here if the source location for this definition is the same (see -; test/DebugInfo/cross-cu-linkonce.ll), though it's very easy to tickle that -; into failing even without duplicating the source as has been done in this -; case (two cpp files in different directories, including the same header that -; contains an inline function - clang will produce distinct subprogram metadata -; that won't deduplicate owing to the file location information containing the -; directory of the source file even though the file name is absolute, not -; relative) +; CHECK: DW_AT_name {{.*}}"b.cpp" +; CHECK-NOT: DW_TAG_subprogram -; CHECK: DW_TAG_subprogram +; CHECK: DW_TAG_compile_unit +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_name {{.*}}"a.cpp" +; CHECK: DW_AT_name {{.*}} "func" @x = global i32 (i32)* @_Z4funci, align 8 @y = global i32 (i32)* @_Z4funci, align 8 @@ -61,7 +53,7 @@ define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !4 { ; Function Attrs: nounwind readnone declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -attributes #0 = { inlinehint nounwind 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 #0 = { inlinehint nounwind uwtable } attributes #1 = { nounwind readnone } !llvm.dbg.cu = !{!12, !0} 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 diff --git a/llvm/test/DebugInfo/X86/debug-dead-local-var.ll b/llvm/test/DebugInfo/X86/debug-dead-local-var.ll index 66a45a78dba..fc04f6dc416 100644 --- a/llvm/test/DebugInfo/X86/debug-dead-local-var.ll +++ b/llvm/test/DebugInfo/X86/debug-dead-local-var.ll @@ -11,9 +11,12 @@ ; return 1; ; } -; Check that we still have the structure type for X even though we're not -; going to emit a low/high_pc for foo. -; CHECK: DW_TAG_structure_type +; Check that we don't have the structure type for X since its scope has +; been optimized away. +; CHECK-NOT: DW_TAG_structure_type +; CHECK: DW_TAG_subprogram +; CHECK: DW_AT_name {{.*}}"bar" +; CHECK-NOT: DW_TAG_structure_type ; Function Attrs: nounwind readnone uwtable define i32 @bar() #0 !dbg !4 { |

