This improves the readability of debugging intrinsics. Instead of:
call void @llvm.dbg.value(metadata !2, ...) !2 = !{}
We will see:
call void @llvm.dbg.value(metadata !{}, ...) !2 = !{}
Note that we still get a numbered metadata entry for the node even if it's not
used elsewhere. This is to avoid adding more context to the print functions.
This is already legal IR - LLVM can parse and understand it - so there is no
need to update the parser.
The next patches in this stack will make such empty metadata operands more
common and semantically important.
Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value
Setting this to false, while it makes total sense to me, caused an error in the LLDB test suite last time it was done[0][1]. Off the top of my head I'm not sure under what circumstances exactly we're calling printMetadataImpl directly for a LocalAsMetadata or DIArgList, but (much as a pain as it is) it probably needs to be verified that this error won't come up again - happy to investigate further myself if needed.
[0] https://reviews.llvm.org/D104827#2856347
[1] https://reviews.llvm.org/D104827#2898216