22 if (
D == Directive::OMPD_unknown || !(getDirectiveLanguages(
D) & L))
25 if (
D == OMPD_ordered_blockassoc)
28 insertName(getOpenMPDirectiveName(
D, V),
D);
36 assert(Current->isValid() &&
"Invalid input state");
37 if (
const State *
Next = Current->next(Tok))
38 return Next->isValid() ?
Next :
nullptr;
49 State *Where = &InitialState;
52 Where = insertTransition(Where, Tok);
57DirectiveNameParser::State *
58DirectiveNameParser::insertTransition(State *From,
StringRef Tok) {
59 assert(From &&
"Expecting state");
60 if (!From->Transition)
61 From->Transition = std::make_unique<State::TransitionMapTy>();
62 if (State *
Next = From->next(Tok))
65 auto [Where, DidIt] = From->Transition->try_emplace(Tok, State());
66 assert(DidIt &&
"Map insertion failed");
67 return &Where->second;
70const DirectiveNameParser::State *
71DirectiveNameParser::State::next(StringRef Tok)
const {
74 auto F = Transition->find(Tok);
75 return F != Transition->end() ? &
F->second :
nullptr;
78DirectiveNameParser::State *DirectiveNameParser::State::next(StringRef Tok) {
81 auto F = Transition->find(Tok);
82 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")
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< Version > 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)