[Dwarf-discuss] Proposal: Define a language version scheme for Swift

Cary Coutant ccoutant@gmail.com
Fri Apr 26 21:21:14 GMT 2024


I've added this as Issue 240422.1
<https://dwarfstd.org/issues/240422.1.html>.

-cary

On Mon, Apr 22, 2024 at 5:01 PM Adrian Prantl via Dwarf-discuss <
dwarf-discuss@lists.dwarfstd.org> wrote:

> # Swift Language version scheme
>
> ## Background
>
> The list of languages at 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
> ```
>
> ## Dependencies
>
> Issue 210419.1
>
> ## References
>
> https://www.swift.org/download/ (see older releases for a history of
> versions).
>
> https://github.com/apple/swift/blob/3d32f5fc8a9087add424a2704ef1dcd89c9307ff/include/swift/Basic/LangOptions.h#L174
> --
> Dwarf-discuss mailing list
> Dwarf-discuss@lists.dwarfstd.org
> https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20240426/b32c6af7/attachment.htm>


More information about the Dwarf-discuss mailing list