[llvm-commits] [llvm] r82758 - /llvm/trunk/utils/FileCheck/FileCheck.cpp

Chris Lattner sabre at nondot.org
Thu Sep 24 23:47:09 PDT 2009


Author: lattner
Date: Fri Sep 25 01:47:09 2009
New Revision: 82758

URL: http://llvm.org/viewvc/llvm-project?rev=82758&view=rev
Log:
filecheck should not match a \n with a .


Modified:
    llvm/trunk/utils/FileCheck/FileCheck.cpp

Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=82758&r1=82757&r2=82758&view=diff

==============================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp Fri Sep 25 01:47:09 2009
@@ -50,7 +50,6 @@
 public:
   PatternChunk(StringRef S, bool isRE) : Str(S), isRegEx(isRE) {}
   
-  
   size_t Match(StringRef Buffer, size_t &MatchLen) const {
     if (!isRegEx) {
       // Fixed string match.
@@ -60,7 +59,7 @@
      
     // Regex match.
     SmallVector<StringRef, 4> MatchInfo;
-    if (!Regex(Str, Regex::Sub).match(Buffer, &MatchInfo))
+    if (!Regex(Str, Regex::Sub|Regex::Newline).match(Buffer, &MatchInfo))
       return StringRef::npos;
     
     // Successful regex match.
@@ -70,7 +69,6 @@
     MatchLen = FullMatch.size();
     return FullMatch.data()-Buffer.data();
   }
-  
 };
 
 class Pattern {





More information about the llvm-commits mailing list