[llvm-dev] Should DISubprogram's scope be allowed to be null?

Keno Fischer via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 14 19:26:13 PST 2016


I'm looking at cases of disagreement between assertions in the backend and
what the Verifier checks for (for http://reviews.llvm.org/D16083). One of
these seems to be the question of whether a DISuprogram may exist without a
DICompileUnit. Currently the Verifier doesn't care, but there are a few
assertions to this extent in the backend.
Possible options are:

1) A DISubprogram may exist without a DICompileUnit (what would we have to
change in the backend?)
2) A DISubprogram's scope may be null, but only if there's a DICompileUnit
that references it.
3) A DISubprogram's scope may not be null, but the referenced DICompileUnit
need not necessarily contain it
4) A DISubprogram's scope may not be null, and the referenced DICompileUnit
must contain it

As far as I can tell, all of these would need some amount of changes to
either existing code or existing test cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160115/c970daab/attachment.html>


More information about the llvm-dev mailing list