
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
14 lines
275 B
CMake
14 lines
275 B
CMake
add_llvm_component_library(LLVMFrontendOpenACC
|
|
ACC.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Frontend
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Frontend/OpenACC
|
|
|
|
DEPENDS
|
|
acc_gen
|
|
)
|
|
|
|
target_link_libraries(LLVMFrontendOpenACC LLVMSupport LLVMFrontendDirective)
|
|
|