[all-commits] [llvm/llvm-project] f8ec37: [utils][TableGen] Handle versions on clause/direct...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Wed May 28 06:26:35 PDT 2025
Branch: refs/heads/users/kparzysz/spr/t08-versioned-spellings
Home: https://github.com/llvm/llvm-project
Commit: f8ec37264cfa7fe714ae626121d894bc18ecc392
https://github.com/llvm/llvm-project/commit/f8ec37264cfa7fe714ae626121d894bc18ecc392
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2025-05-28 (Wed, 28 May 2025)
Changed paths:
A llvm/include/llvm/Frontend/Directive/Spelling.h
M llvm/include/llvm/TableGen/DirectiveEmitter.h
M llvm/lib/Frontend/CMakeLists.txt
A llvm/lib/Frontend/Directive/CMakeLists.txt
A llvm/lib/Frontend/Directive/Spelling.cpp
M llvm/lib/Frontend/OpenACC/CMakeLists.txt
M llvm/lib/Frontend/OpenMP/CMakeLists.txt
M llvm/test/TableGen/directive1.td
M llvm/test/TableGen/directive2.td
M llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
Log Message:
-----------
[utils][TableGen] Handle versions on clause/directive spellings
In "get<lang>DirectiveName(Kind, Version)", return the spelling that
corresponds to Version, and in "get<lang>DirectiveKindAndVersions(Name)"
return the pair {Kind, VersionRange}, where VersionRange contains the
minimum and the maximum versions that allow "Name" as a spelling.
This applies to clauses as well. In general it applies to classes that
have spellings (defined via TableGen class "Spelling").
Given a Kind and a Version, getting the corresponding spelling requires
a runtime search (which can fail in a general case). To avoid generating
the search function inline, a small additional component of llvm/Frontent
was added: LLVMFrontendDirective. The corresponding header file also
defines C++ classes "Spelling" and "VersionRange", which are used in
TableGen/DirectiveEmitter as well.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list