aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Regex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Regex.cpp')
-rw-r--r--lib/Support/Regex.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Support/Regex.cpp b/lib/Support/Regex.cpp
index d293da0..0a5479a 100644
--- a/lib/Support/Regex.cpp
+++ b/lib/Support/Regex.cpp
@@ -27,7 +27,9 @@ Regex::Regex(StringRef regex, unsigned Flags) {
flags |= REG_ICASE;
if (Flags & Newline)
flags |= REG_NEWLINE;
- error = llvm_regcomp(preg, regex.data(), flags|REG_EXTENDED|REG_PEND);
+ if (!(Flags & BasicRegex))
+ flags |= REG_EXTENDED;
+ error = llvm_regcomp(preg, regex.data(), flags|REG_PEND);
}
Regex::~Regex() {