[PATCH] D117486: DebugInfo: Fix null dereference on null DISubroutineType

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 19:58:25 PST 2022


aprantl added a comment.

It surprises me that the assembler doesn't seem to require a type either. I think I agree with David that it would be better to let the Verifier fail here and require a type. For reference, this is how clang produces void():

  !9 = distinct !DISubprogram(name: "f", scope: !10, file: !10, line: 1, type: !11, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !7)
  !10 = !DIFile(filename: "/tmp/t.c", directory: "")
  !11 = !DISubroutineType(types: !12)
  !12 = !{null}


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117486/new/

https://reviews.llvm.org/D117486



More information about the llvm-commits mailing list