diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-24 21:47:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-24 21:47:32 +0000 |
commit | 528700863adefca8de461ce28a7d903729fb96b4 (patch) | |
tree | 904a28d55c7039cefe27a789ca9d4c6465dd6e7e /include/llvm/Support/Regex.h | |
parent | fe03dbeaa30187a75548d891cbe3f5cc97e73713 (diff) | |
download | external_llvm-528700863adefca8de461ce28a7d903729fb96b4.tar.gz external_llvm-528700863adefca8de461ce28a7d903729fb96b4.tar.bz2 external_llvm-528700863adefca8de461ce28a7d903729fb96b4.zip |
add and document regex support for FileCheck. You can now do stuff like:
; CHECK: movl {{%e[a-z][xi]}}, %eax
or whatever.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Regex.h')
-rw-r--r-- | include/llvm/Support/Regex.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/Support/Regex.h b/include/llvm/Support/Regex.h index 4c4229eb57..0bf253f4c1 100644 --- a/include/llvm/Support/Regex.h +++ b/include/llvm/Support/Regex.h @@ -11,11 +11,14 @@ // //===----------------------------------------------------------------------===// -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" +#include <string> struct llvm_regex; + namespace llvm { + class StringRef; + template<typename T> class SmallVectorImpl; + class Regex { public: enum { @@ -54,6 +57,8 @@ namespace llvm { /// Matches. /// For this feature to be enabled you must construct the regex using /// Regex("...", Regex::Sub) constructor. + /// + /// This returns true on a successful match. bool match(const StringRef &String, SmallVectorImpl<StringRef> *Matches=0); private: struct llvm_regex *preg; |