summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2019-08-20 16:05:23 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2019-08-20 16:05:23 +0000
commited602ef4804e9be83151e07bf8cc53d6a7538ea9 (patch)
treef2d6222edd54691194650b42c1465260ccef170f
parentbe699bf38995f940225aa31b520be00721e258b2 (diff)
downloadbcm5719-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.h1
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
OpenPOWER on IntegriCloud