[PATCH] D97311: [DebugInfo] Introduce DIConstant metadata for representing named constants

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 14:59:06 PST 2021


dblaikie added a comment.

In D97311#2588856 <https://reviews.llvm.org/D97311#2588856>, @aprantl wrote:

> Have you considered instead introducing a `bool isConstant` field in DILocalVariable? This way we could reuse all the machinery for local/global variables and only need to switch out the TAG in AsmPrinter.

Guess it gets a bit complicated if it has to support non-local constants too.

& could potentially do this via adding a tag field to DILocalVariable (& DIGlobalVariable too), same as for DICompositeTypes - but a bool's probably more compact & covers the use cases for now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97311



More information about the llvm-commits mailing list