1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Verifier/disubprogram-name-match-only.ll
Adrian Prantl ae0ba63fe4 More principled implementation of DISubprogram::describes()
Previously we would also accept DISubprograms that matched in name
only, but this doesn't appear to be necessary any more.

I did a Full and Thin LTO build of Clang and it completed without a warning.

Differential Revision: https://reviews.llvm.org/D75213
2020-03-02 10:03:14 -08:00

27 lines
1006 B
LLVM

; RUN: llvm-as -disable-output <%s 2>&1| FileCheck %s
define void @f() !dbg !14 {
ret void, !dbg !5
}
!llvm.module.flags = !{!15}
!llvm.dbg.cu = !{!4}
!0 = !{null}
!1 = distinct !DICompositeType(tag: DW_TAG_structure_type)
!2 = !DIFile(filename: "f.c", directory: "/")
!3 = !DISubroutineType(types: !0)
!4 = distinct !DICompileUnit(language: DW_LANG_C, file: !2)
; CHECK: !dbg attachment points at wrong subprogram for function
; CHECK: warning: ignoring invalid debug info
!5 = !DILocation(line: 1, scope: !9)
!9 = distinct !DISubprogram(name: "f", scope: !1,
file: !2, line: 1, type: !3, isLocal: true,
isDefinition: true, scopeLine: 2,
unit: !4)
!14 = distinct !DISubprogram(name: "f", scope: !1,
file: !2, line: 1, type: !3, isLocal: true,
isDefinition: true, scopeLine: 2,
unit: !4)
!15 = !{i32 1, !"Debug Info Version", i32 3}