[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 16:41:26 PDT 2019
aprantl added a comment.
In D67563#1670183 <https://reviews.llvm.org/D67563#1670183>, @dblaikie wrote:
> Out of curiosity does swift have const in the type system like C and C++? (I guess so) - and what would be the difference between a normal (non-let) variable of a const type, versus a let variable of a non-const type?
Swift does not have const in the type system. There are no real pointers in the language; the closest equivalent are probably constant struct members, such as:
struct MyStruct {
let i_am_a_constant : Int = 42
var i_am_mutable : String
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67563/new/
https://reviews.llvm.org/D67563
More information about the llvm-commits
mailing list