diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-05 17:47:59 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-05 17:47:59 +0000 |
commit | fe8cd7597142cc0533411b81dd82cd8ef48ed716 (patch) | |
tree | c994783609d667944d15228265890d80bc2f4769 /llvm/include | |
parent | bd6389b11fd936698e90083fc85cbf837774b29c (diff) | |
download | bcm5719-llvm-fe8cd7597142cc0533411b81dd82cd8ef48ed716.tar.gz bcm5719-llvm-fe8cd7597142cc0533411b81dd82cd8ef48ed716.zip |
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
llvm-svn: 187731
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/Support/Regex.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Regex.h b/llvm/include/llvm/Support/Regex.h index 82df2c67bd0..3d071bedbd8 100644 --- a/llvm/include/llvm/Support/Regex.h +++ b/llvm/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; |