diff options
Diffstat (limited to 'include/llvm/Support/Regex.h')
-rw-r--r-- | include/llvm/Support/Regex.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Support/Regex.h b/include/llvm/Support/Regex.h index 3d071bedbd..21677dcfa1 100644 --- a/include/llvm/Support/Regex.h +++ b/include/llvm/Support/Regex.h @@ -81,6 +81,9 @@ namespace llvm { /// expression that matches Str and only Str. static bool isLiteralERE(StringRef Str); + /// \brief Turn String into a regex by escaping its special characters. + static std::string escape(StringRef String); + private: struct llvm_regex *preg; int error; |