15Expected<NameOrPattern>
23 bool IsPositiveMatch = !
Pattern.consume_front(
"!");
34 return NameOrPattern(std::make_shared<GlobPattern>(*GlobOrErr),
42 "cannot compile regular expression \'" +
46 (
"^" +
Pattern.ltrim(
'^').rtrim(
'$') +
"$").toStringRef(
Data)));
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
static Expected< GlobPattern > create(StringRef Pat, std::optional< size_t > MaxSubPatterns={})
bool isValid(std::string &Error) const
isValid - returns the error encountered during regex compilation, if any.
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.
An efficient, type-erasing, non-owning reference to a callable.
static Expected< NameOrPattern > create(StringRef Pattern, MatchStyle MS, llvm::function_ref< Error(Error)> ErrorCallback)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.