[PATCH] D67563: Debug Info: Add support for named constants
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 17:02:24 PDT 2019
aprantl added a comment.
In D67563#1670226 <https://reviews.llvm.org/D67563#1670226>, @dblaikie wrote:
> Would seem to me (with an obvious C++ bias in my view of the world) that it maps best to i_am_a_constant being a DW_TAG_variable (or function_parameter) with a DW_TAG_const_type that has a base type of "Int" (however that's represented).
>
> But I realize that might not be a good fit for Swift/its debuggers, etc, and certainly tend to leave this up to whatever you folks want to do with your language. Just my 2c :)
It's not elegant in LLDB to peel the constness out of the type and attach it to the variable (the code that takes a DWARF type and returns a Swift type would need to ignore it and the code that builds an lldb_private::Variable needs to look into the DW_AT_type), but certainly doable, and implementation details of one specific debugger shouldn't really affect this decision. The prevalence of let-bindings may cause debug info to blow up a bit with all the extra DW_TAG_const_types, but that's not going to be a showstopper either.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67563/new/
https://reviews.llvm.org/D67563
More information about the llvm-commits
mailing list