summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-08-05 17:47:59 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-08-05 17:47:59 +0000
commitaa80e61b0d79ddf9593f6217063574d0c66c3099 (patch)
treeb67392ed36975afce5e1c12553d94b9274dc9321 /include
parent2a37c7e9e6059f7b5cfffce8917a49c0810d5a18 (diff)
downloadllvm-aa80e61b0d79ddf9593f6217063574d0c66c3099.tar.gz
llvm-aa80e61b0d79ddf9593f6217063574d0c66c3099.tar.bz2
llvm-aa80e61b0d79ddf9593f6217063574d0c66c3099.tar.xz
Introduce Regex::isLiteralERE function.
This will be used to implement an optimisation for literal entries in special case lists. Differential Revision: http://llvm-reviews.chandlerc.com/D1278 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/Regex.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Support/Regex.h b/include/llvm/Support/Regex.h
index 82df2c67bd..3d071bedbd 100644
--- a/include/llvm/Support/Regex.h
+++ b/include/llvm/Support/Regex.h
@@ -77,6 +77,10 @@ namespace llvm {
/// string.
std::string sub(StringRef Repl, StringRef String, std::string *Error = 0);
+ /// \brief If this function returns true, ^Str$ is an extended regular
+ /// expression that matches Str and only Str.
+ static bool isLiteralERE(StringRef Str);
+
private:
struct llvm_regex *preg;
int error;