[llvm] [RemoveDIs] Print non-intrinsic debug info in textual IR output (PR #79281)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 03:34:40 PST 2024


nikic wrote:

> > Why is the syntax `#dbg_value {}` rather than `#dbg_value()`? The arguments are positional, right?
> 
> As @phyBrackets mentioned the goal is purely for visual distinction - it would be possible to use parentheses instead. We do use curly braces in contexts where we expect ordered/positional arguments, as with structs and some non-specialized MDNodes; ultimately though it's a minor detail and can easily be changed if there's a strong preference for either option.

If `{}` is used, I would generally expect something list-like. This may be an ordered (metadata, struct) or an unordered (attributes) list, but I would expect that I can specify an arbitrary number of arbitrary elements. As far as I understand, for `#dbg_value` and friends, the schema is fixed.

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


More information about the llvm-commits mailing list