Lines Matching refs:preg
27 Regex::Regex() : preg(nullptr), error(REG_BADPAT) {} in Regex()
31 preg = new llvm_regex(); in Regex()
32 preg->re_endp = regex.end(); in Regex()
39 error = llvm_regcomp(preg, regex.data(), flags|REG_PEND); in Regex()
46 preg = regex.preg; in Regex()
48 regex.preg = nullptr; in Regex()
53 if (preg) { in ~Regex()
54 llvm_regfree(preg); in ~Regex()
55 delete preg; in ~Regex()
62 void RegexErrorToString(int error, struct llvm_regex *preg, in RegexErrorToString() argument
64 size_t len = llvm_regerror(error, preg, nullptr, 0); in RegexErrorToString()
67 llvm_regerror(error, preg, &Error[0], len); in RegexErrorToString()
76 RegexErrorToString(error, preg, Error); in isValid()
83 return preg->re_nsub; in getNumMatches()
96 unsigned nmatch = Matches ? preg->re_nsub+1 : 0; in match()
104 int rc = llvm_regexec(preg, String.data(), nmatch, pm.data(), REG_STARTEND); in match()
112 RegexErrorToString(error, preg, *Error); in match()