23 if (
D == Directive::OMPD_unknown || !(getDirectiveLanguages(
D) & L))
26 if (
D == OMPD_ordered_blockassoc)
29 insertName(getOpenMPDirectiveName(
D, Ver),
D);
37 assert(Current->isValid() &&
"Invalid input state");
38 if (
const State *
Next = Current->next(Tok))
39 return Next->isValid() ?
Next :
nullptr;
50 State *Where = &InitialState;
53 Where = insertTransition(Where, Tok);
58DirectiveNameParser::State *
59DirectiveNameParser::insertTransition(State *From,
StringRef Tok) {
60 assert(From &&
"Expecting state");
61 if (!From->Transition)
62 From->Transition = std::make_unique<State::TransitionMapTy>();
63 if (State *
Next = From->next(Tok))
66 auto [Where, DidIt] = From->Transition->try_emplace(Tok, State());
67 assert(DidIt &&
"Map insertion failed");
68 return &Where->second;
71const DirectiveNameParser::State *
72DirectiveNameParser::State::next(StringRef Tok)
const {
75 auto F = Transition->find(Tok);
76 return F != Transition->end() ? &
F->second :
nullptr;
79DirectiveNameParser::State *DirectiveNameParser::State::next(StringRef Tok) {
82 auto F = Transition->find(Tok);
83 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.
Represent a constant reference to a string, i.e.
LLVM_ABI ArrayRef< unsigned > getOpenMPVersions()
static constexpr auto directives()
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,...
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Next
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)