From 528700863adefca8de461ce28a7d903729fb96b4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 24 Sep 2009 21:47:32 +0000 Subject: 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 --- include/llvm/Support/Regex.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/llvm/Support/Regex.h') 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 struct llvm_regex; + namespace llvm { + class StringRef; + template 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 *Matches=0); private: struct llvm_regex *preg; -- cgit v1.2.3