[PATCH] D89817: [DebugInfo] Expose Fortran array debug info attributes through DIBuilder.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 10:38:23 PDT 2020


aprantl added a comment.

> These can be DIExpression, ConstantAsMetadata, etc, so Metadata looks to be the right specificity (and the underlying 'get' function it calls types them as Metadata too).

Why do we need to accept both DIExpression and ConstantAsMetadata? Since we can also represent all constants as DIExpression, I think I would prefer to have only one way to represent a constant. Would it be feasible to expect clients to pass constants as DIExpression(DW_OP_constu, <number>, DW_OP_stack_value)? And if it doesn't already exist perhaps add a `DIExpression *DIBuilder::createConstantExpression(unsigned value)` API?


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

https://reviews.llvm.org/D89817



More information about the llvm-commits mailing list