diff options
author | Alexander Kornienko <alexfh@google.com> | 2012-12-11 15:36:31 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2012-12-11 15:36:31 +0000 |
commit | b50a126556a69df0fb68a190afdaf9850410fd4a (patch) | |
tree | 57e2fdf1caf960d8d878e0289f32af6759832b49 /lib/Support/Regex.cpp | |
parent | ccaf20cc53a3dc353f4786b1ebf4ebb3f81d4746 (diff) | |
parent | 1ad9253c9d34ccbce3e7e4ea5d87c266cbf93410 (diff) |
Updating branches/google/testing to r169803
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/testing@169870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Regex.cpp')
-rw-r--r-- | lib/Support/Regex.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Support/Regex.cpp b/lib/Support/Regex.cpp index d293da07d6..efc8b90a00 100644 --- a/lib/Support/Regex.cpp +++ b/lib/Support/Regex.cpp @@ -12,10 +12,10 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/Regex.h" +#include "regex_impl.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/ADT/SmallVector.h" -#include "regex_impl.h" #include <string> using namespace llvm; @@ -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() { |