|
clang 22.0.0git
|
Helper data structure representing the traits in a match clause of an declare variant or metadirective. More...
#include "clang/AST/OpenMPClause.h"
Public Member Functions | |
| OMPTraitInfo (StringRef MangledName) | |
| Reconstruct a (partial) OMPTraitInfo object from a mangled name. | |
| bool | anyScoreOrCondition (llvm::function_ref< bool(Expr *&, bool)> Cond) |
| void | getAsVariantMatchInfo (ASTContext &ASTCtx, llvm::omp::VariantMatchInfo &VMI) const |
| Create a variant match info object from this trait info object. | |
| std::string | getMangledName () const |
| Return a string representation identifying this context selector. | |
| bool | isExtensionActive (llvm::omp::TraitProperty TP) |
Check the extension trait TP is active. | |
| void | print (llvm::raw_ostream &OS, const PrintingPolicy &Policy) const |
Print a human readable representation into OS. | |
Public Attributes | |
| llvm::SmallVector< OMPTraitSet, 2 > | Sets |
| The outermost level of selector sets. | |
Friends | |
| class | ASTContext |
Helper data structure representing the traits in a match clause of an declare variant or metadirective.
The outer level is an ordered collection of selector sets, each with an associated kind and an ordered collection of selectors. A selector has a kind, an optional score/condition, and an ordered collection of properties.
Definition at line 9731 of file OpenMPClause.h.
| OMPTraitInfo::OMPTraitInfo | ( | StringRef | MangledName | ) |
Reconstruct a (partial) OMPTraitInfo object from a mangled name.
Definition at line 3021 of file OpenMPClause.cpp.
References clang::Property, clang::Set, and Sets.
|
inline |
Definition at line 9743 of file OpenMPClause.h.
References clang::Cond, clang::Set, and Sets.
Referenced by clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), and instantiateOMPDeclareVariantAttr().
| void OMPTraitInfo::getAsVariantMatchInfo | ( | ASTContext & | ASTCtx, |
| llvm::omp::VariantMatchInfo & | VMI ) const |
Create a variant match info object from this trait info object.
While the former is a flat representation the actual main difference is that the latter uses clang::Expr to store the score/condition while the former is independent of clang. Thus, expressions and conditions are evaluated in this method.
Definition at line 2892 of file OpenMPClause.cpp.
References ASTContext, clang::Property, clang::Set, and Sets.
Referenced by clang::SemaOpenMP::ActOnOpenMPCall(), clang::SemaOpenMP::ActOnOpenMPDeclareVariantDirective(), and clang::Parser::ParseOpenMPDeclareBeginVariantDirective().
| std::string OMPTraitInfo::getMangledName | ( | ) | const |
Return a string representation identifying this context selector.
Definition at line 2995 of file OpenMPClause.cpp.
References clang::Property, clang::Set, and Sets.
|
inline |
Check the extension trait TP is active.
Definition at line 9767 of file OpenMPClause.h.
References clang::Property, clang::Set, and Sets.
Referenced by clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope().
| void OMPTraitInfo::print | ( | llvm::raw_ostream & | OS, |
| const PrintingPolicy & | Policy ) const |
Print a human readable representation into OS.
Definition at line 2942 of file OpenMPClause.cpp.
References clang::Property, clang::Set, and Sets.
Referenced by clang::operator<<().
|
friend |
Definition at line 9734 of file OpenMPClause.h.
References ASTContext.
Referenced by ASTContext, and getAsVariantMatchInfo().
| llvm::SmallVector<OMPTraitSet, 2> clang::OMPTraitInfo::Sets |
The outermost level of selector sets.
Definition at line 9741 of file OpenMPClause.h.
Referenced by anyScoreOrCondition(), getAsVariantMatchInfo(), getMangledName(), isExtensionActive(), OMPTraitInfo(), print(), clang::ASTRecordReader::readOMPTraitInfo(), and clang::ASTRecordWriter::writeOMPTraitInfo().