diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2019-08-20 16:05:23 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2019-08-20 16:05:23 +0000 |
commit | ed602ef4804e9be83151e07bf8cc53d6a7538ea9 (patch) | |
tree | f2d6222edd54691194650b42c1465260ccef170f | |
parent | be699bf38995f940225aa31b520be00721e258b2 (diff) | |
download | bcm5719-llvm-ed602ef4804e9be83151e07bf8cc53d6a7538ea9.tar.gz bcm5719-llvm-ed602ef4804e9be83151e07bf8cc53d6a7538ea9.zip |
Regex: Add isValid() with no parameter
There will be some performance (only a little) improvement for LLDB's
RegularExpression::Execute.
Differential Revision: https://reviews.llvm.org/D66463
llvm-svn: 369396
-rw-r--r-- | llvm/include/llvm/Support/Regex.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Regex.h b/llvm/include/llvm/Support/Regex.h index b05349dee88..ca5e8cd79a6 100644 --- a/llvm/include/llvm/Support/Regex.h +++ b/llvm/include/llvm/Support/Regex.h @@ -60,6 +60,7 @@ namespace llvm { /// isValid - returns the error encountered during regex compilation, or /// matching, if any. bool isValid(std::string &Error) const; + bool isValid() const { return !error; } /// getNumMatches - In a valid regex, return the number of parenthesized /// matches it contains. The number filled in by match will include this |