[llvm] [LLVM][DebugInfo]Allow ExtraData field to be a node reference (PR #165023)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 06:19:29 PDT 2025


OCHyams wrote:

I feel like I'm being a bit of a stick in the mud here possibly unnecessarily - I'd be perfectly happy if someone else wants to approve this as is.

It feels like an odd change to me because although yes it is asserting, which isn't very user-friendly, it seems like accepting non-constant data is not intended. Without knowing the tool at all, naively, it sounds like this would ideally be solved in llvmlite (i.e., emit/consume the metadata constants) rather than in LLVM. Taking this to an extreme, we wouldn't want to accept metadata tuples of constants _everywhere_ that metadata constants are accepted.

That said, this area does seem poorly specified. The langref only briefly mentions the extraData field and the verifier doesn't complain. I think in an ideal world the verifier would have complained about the tuple extraData, rather than hitting an assert later.

I think I'd feel slightly better about it if verifier checks could be added?

https://github.com/llvm/llvm-project/pull/165023


More information about the llvm-commits mailing list