X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FRegex.cpp;h=efc8b90a009091a42ff18b0094ba4bce8029e784;hb=0a230e0d985625a3909cb78fd867a3abaf434565;hp=d293da07d684047543478817f57441ff3708324d;hpb=6ff80b2281eea0f42458bbf9790d5e340d9d7797;p=oota-llvm.git diff --git a/lib/Support/Regex.cpp b/lib/Support/Regex.cpp index d293da07d68..efc8b90a009 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 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() {