49#define snprintf _snprintf
59 {
REG_NOMATCH,
"REG_NOMATCH",
"llvm_regexec() failed to match" },
60 {
REG_BADPAT,
"REG_BADPAT",
"invalid regular expression" },
61 {
REG_ECOLLATE,
"REG_ECOLLATE",
"invalid collating element" },
62 {
REG_ECTYPE,
"REG_ECTYPE",
"invalid character class" },
63 {
REG_EESCAPE,
"REG_EESCAPE",
"trailing backslash (\\)" },
64 {
REG_ESUBREG,
"REG_ESUBREG",
"invalid backreference number" },
65 {
REG_EBRACK,
"REG_EBRACK",
"brackets ([ ]) not balanced" },
66 {
REG_EPAREN,
"REG_EPAREN",
"parentheses not balanced" },
67 {
REG_EBRACE,
"REG_EBRACE",
"braces not balanced" },
68 {
REG_BADBR,
"REG_BADBR",
"invalid repetition count(s)" },
69 {
REG_ERANGE,
"REG_ERANGE",
"invalid character range" },
71 {
REG_BADRPT,
"REG_BADRPT",
"repetition-operator operand invalid" },
72 {
REG_EMPTY,
"REG_EMPTY",
"empty (sub)expression" },
73 {
REG_ASSERT,
"REG_ASSERT",
"\"can't happen\" -- you found a bug" },
74 {
REG_INVARG,
"REG_INVARG",
"invalid argument to regex routine" },
75 { 0,
"",
"*** unknown regexp error code ***" }
88 int target = errcode &~ REG_ITOA;
93 s =
regatoi(preg, convbuf,
sizeof convbuf);
96 if (r->
code == target)
104 (
void)snprintf(convbuf,
sizeof convbuf,
112 if (errbuf_size > 0) {
133 (void)snprintf(localbuf, localbufsize,
"%d", r->
code);
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static struct rerr rerrs[]
size_t llvm_regerror(int errcode, const llvm_regex_t *preg, char *errbuf, size_t errbuf_size)
static const char * regatoi(const llvm_regex_t *, char *, int)
size_t llvm_strlcpy(char *dst, const char *src, size_t siz)