-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[llvm][Dwarf] Add LanguageDescription API that accounts for version #162048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Michael137
merged 6 commits into
llvm:main
from
Michael137:llvm/dwarf-versioned-language-name
Oct 8, 2025
+156
−0
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
845c1c9
[llvm][Dwarf] Add LanguageDescription API that accounts for version
Michael137 335d824
fixup! expand docs
Michael137 427784d
fixup! handle C version 0
Michael137 1c62bcc
fixup! unittests
Michael137 924d111
fixup! move tests, remove redundant casts
Michael137 70e3ed1
fixup! add back newline
Michael137 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd have expected these to work the other way around - like if the Version is < 1995, then it's Ada 83.
Might be weird to say it's Ada95 when the version is 1990/before 1995? But I'm not sure if there's a clear general sense, or language-specific sense, of what the intermediate values should mean.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea those intermediate values haven't really been specified i think. I took inspiration from the logic in:
llvm-project/llvm/include/llvm/BinaryFormat/Dwarf.h
Lines 228 to 273 in c2765b7
There we round up the intermediate version number. Reading https://dwarfstd.org/languages-v6.html, it sounds like the version number specifies the completion of a particular language version. Anything after that is the next version. At least that's how I think about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable way to deal with pre-release compilers that guess the final date of the standard incorrectly. The other alternative would be put the raw version in the string.