https://llvm.org/bugs/show_bug.cgi?id=31392
Bug ID: 31392 Summary: DI Verifier doesn't catch missing type on DISubprogram Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: DebugInfo Assignee: unassignedb...@nondot.org Reporter: dblai...@gmail.com CC: apra...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified I've pruned the metadata down a bit, since it's small enough to be legible, etc: define void @_Z1fv() #0 !dbg !6 { entry: ret void, !dbg !9 } !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} !llvm.ident = !{!5} !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, emissionKind: FullDebug) !1 = !DIFile(filename: "simple.cpp", directory: "/tmp/dbginfo") !3 = !{i32 2, !"Dwarf Version", i32 4} !4 = !{i32 2, !"Debug Info Version", i32 3} !5 = !{!"clang version 4.0.0 (trunk 289692) (llvm/trunk 289697)"} !6 = distinct !DISubprogram(name: "f", unit: !0) !7 = !DISubroutineType(types: !8) !8 = !{null} !9 = !DILocation(line: 2, column: 1, scope: !6) This crashes in CodeGen attempting to create debug info - specifically trying to access the type of the DISubprogram, since it's not present. Adding 'type: !7' to the DISubprogram fixes this & should be needed on all DISubprograms, I think. (arguably we could define an unspecified type as being 'void()' but I don't think the savings in space are worth cost in terms of complexity, etc) -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs