[all-commits] [llvm/llvm-project] 7b2aa0: [utils][TableGen] Handle versions on clause/direct...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Fri Jun 6 15:07:47 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7b2aa02a33df2ffd59fa1c043c10ec05dc411171
https://github.com/llvm/llvm-project/commit/7b2aa02a33df2ffd59fa1c043c10ec05dc411171
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2025-06-06 (Fri, 06 Jun 2025)
Changed paths:
M llvm/include/llvm/Frontend/Directive/DirectiveBase.td
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 (#143021)
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.
For background information see
https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507
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