# Add version scheme for Swift language ## Background The list of languages in Section 3.1, Tsble 3.1, and at [languages-v6.html](https://dwarfstd.org/languages-v6.html), does not list a version scheme for the Swift language. This proposal adds one. ## Overview The Swift programming language does not have a version scheme defined for DW_AT_language_version. This proposal defines it to use the `VVMM` version scheme. This way "Swift 5.10" would be DW_AT_language(DW_LANG_Swift) DW_AT_language_version(510) and "Swift 6" would be `DW_AT_language_version(600)`. Even though Swift package releases usually have a Major.Minor.Patch version scheme (e.g., Swift 5.9.2), the Swift compiler frontend's LangOptions data structure only uses Major.Minor to distinguish syntax changes in the parser (see References). This version scheme is designed to match what the compiler does. ## Proposed Changes Augment the table of language encodings to say Swift DW_LNAME_Swift 0x001a 0 VVMM ## References - Issue [210419.1](210419.1.html) - [Swift downloads](https://www.swift.org/download/) (see older releases for a history of versions). - [LangOptions.h](https://github.com/apple/swift/blob/3d32f5fc8a9087add424a2704ef1dcd89c9307ff/include/swift/Basic/LangOptions.h#L174) --- 2024-04-29: Accepted.