diff options
Diffstat (limited to 'lib/Support/Regex.cpp')
-rw-r--r-- | lib/Support/Regex.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Support/Regex.cpp b/lib/Support/Regex.cpp index d293da07d6..0a5479a548 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() { |