24 if (
D == Directive::OMPD_unknown || !(getDirectiveLanguages(
D) & L))
27 insertName(getOpenMPDirectiveName(
D, Ver),
D);
35 assert(Current->isValid() &&
"Invalid input state");
36 if (
const State *
Next = Current->next(Tok))
37 return Next->isValid() ?
Next :
nullptr;
48 State *Where = &InitialState;
51 Where = insertTransition(Where, Tok);
56DirectiveNameParser::State *
57DirectiveNameParser::insertTransition(State *From,
StringRef Tok) {
58 assert(From &&
"Expecting state");
59 if (!From->Transition)
60 From->Transition = std::make_unique<State::TransitionMapTy>();
61 if (State *
Next = From->next(Tok))
64 auto [Where, DidIt] = From->Transition->try_emplace(Tok, State());
65 assert(DidIt &&
"Map insertion failed");
66 return &Where->second;
69const DirectiveNameParser::State *
70DirectiveNameParser::State::next(StringRef Tok)
const {
73 auto F = Transition->find(Tok);
74 return F != Transition->end() ? &
F->second :
nullptr;
77DirectiveNameParser::State *DirectiveNameParser::State::next(StringRef Tok) {
80 auto F = Transition->find(Tok);
81 return F != Transition->end() ? &
F->second :
nullptr;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
Provides some synthesis utilities to produce sequences of values.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
LLVM_ABI ArrayRef< unsigned > getOpenMPVersions()
LLVM_ABI void SplitString(StringRef Source, SmallVectorImpl< StringRef > &OutFragments, StringRef Delimiters=" \t\n\v\f\r")
SplitString - Split up the specified string according to the specified delimiters,...
FunctionAddr VTableAddr Next
auto seq(T Begin, T End)
Iterate over an integral type from Begin up to - but not including - End.
static LLVM_ABI SmallVector< StringRef > tokenize(StringRef N)
LLVM_ABI const State * consume(const State *Current, StringRef Tok) const
LLVM_ABI DirectiveNameParser(SourceLanguage L=SourceLanguage::C)