summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Regex.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-09 06:29:24 +0000
committerChris Lattner <sabre@nondot.org>2011-04-09 06:29:24 +0000
commit0687ec705197b20295e0ae291183ec82da0ce904 (patch)
tree0ae2ae71c7aa74062737eab86631f4826d45d1a4 /llvm/lib/Support/Regex.cpp
parent53e0679d6f574b2d4e7ee05d51556edd8cc71750 (diff)
downloadbcm5719-llvm-0687ec705197b20295e0ae291183ec82da0ce904.tar.gz
bcm5719-llvm-0687ec705197b20295e0ae291183ec82da0ce904.zip
regexes are allowed to match empty things, e.g. {{.*}} in filecheck.
llvm-svn: 129193
Diffstat (limited to 'llvm/lib/Support/Regex.cpp')
-rw-r--r--llvm/lib/Support/Regex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Regex.cpp b/llvm/lib/Support/Regex.cpp
index 309ffb02dec..d293da07d68 100644
--- a/llvm/lib/Support/Regex.cpp
+++ b/llvm/lib/Support/Regex.cpp
@@ -82,7 +82,7 @@ bool Regex::match(StringRef String, SmallVectorImpl<StringRef> *Matches){
Matches->push_back(StringRef());
continue;
}
- assert(pm[i].rm_eo > pm[i].rm_so);
+ assert(pm[i].rm_eo >= pm[i].rm_so);
Matches->push_back(StringRef(String.data()+pm[i].rm_so,
pm[i].rm_eo-pm[i].rm_so));
}
OpenPOWER on IntegriCloud