[PATCH] D67563: Debug Info: Add support for named constants
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 19 08:35:37 PDT 2019
aprantl added a comment.
Swift's `let` is indeed closer to C's `const` than to a named constant in Pascal (https://wiki.freepascal.org/Constants). The Swift language spec call them constants, and they are effectively SSA variables (with storage). But (and this is where it differs from Pascal constants) `let` bindings can also appear inside of composite types (there are `let` struct and class members) and as function arguments (unless a parameter is explicitly marked as `inout`, similar to Fortran). I have found that `DW_TAG_const` is the only mechanism that works for all of these use-cases.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67563/new/
https://reviews.llvm.org/D67563
More information about the llvm-commits
mailing list