[llvm] r190896 - Use function's argument instead of the global flag.

Matt Arsenault Matthew.Arsenault at amd.com
Tue Sep 17 15:45:57 PDT 2013


Author: arsenm
Date: Tue Sep 17 17:45:57 2013
New Revision: 190896

URL: http://llvm.org/viewvc/llvm-project?rev=190896&view=rev
Log:
Use function's argument instead of the global flag.

For now it happens the argument is always the same.

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=190896&r1=190895&r2=190896&view=diff
==============================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp Tue Sep 17 17:45:57 2013
@@ -670,11 +670,11 @@ static bool IsPartOfWord(char c) {
 }
 
 static Check::CheckType FindCheckType(StringRef &Buffer, StringRef Prefix) {
-  char NextChar = Buffer[CheckPrefix.size()];
+  char NextChar = Buffer[Prefix.size()];
 
   // Verify that the : is present after the prefix.
   if (NextChar == ':') {
-    Buffer = Buffer.substr(CheckPrefix.size() + 1);
+    Buffer = Buffer.substr(Prefix.size() + 1);
     return Check::CheckPlain;
   }
 
@@ -683,7 +683,7 @@ static Check::CheckType FindCheckType(St
     return Check::CheckNone;
   }
 
-  StringRef Rest = Buffer.drop_front(CheckPrefix.size() + 1);
+  StringRef Rest = Buffer.drop_front(Prefix.size() + 1);
   if (Rest.startswith("NEXT:")) {
     Buffer = Rest.drop_front(sizeof("NEXT:") - 1);
     return Check::CheckNext;





More information about the llvm-commits mailing list