[llvm-bugs] [Bug 28697] New: 'invalid subroutine type ref' when linking with custom meta data
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 25 10:30:41 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28697
Bug ID: 28697
Summary: 'invalid subroutine type ref' when linking with custom
meta data
Product: new-bugs
Version: 3.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: robin at icir.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
With the code below, it looks like llvm-link merges the debug information in
b.ll with the custom metadata in a.ll. Is that a bug, or am I missing
something? This is with a current 3.9.0 version.
# cat cat a.ll
define void @a() {
ret void
}
!bar = !{!3}
!3 = !{void ()* @a}
# cat b.ll
define void @foo() !dbg !20 {
ret void
}
!llvm.module.flags = !{!17, !18}
!0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1)
!1 = !DIFile(filename: "x.c", directory: "/tmp")
!17 = !{i32 2, !"Dwarf Version", i32 4}
!18 = !{i32 2, !"Debug Info Version", i32 3}
!20 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 92, type:
!21, unit: !0)
!21 = !DISubroutineType(types: !22)
!22 = !{null}
!23 = !{}
# llvm-link -o out a.ll b.ll
invalid subroutine type ref
!5 = !DISubroutineType(types: !0)
!0 = !{void ()* @a}
void ()* @a
All DICompileUnits must be listed in llvm.dbg.cu
llvm-link: error: linked module is broken!
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160725/7d06b288/attachment.html>
More information about the llvm-bugs
mailing list