[llvm] r265444 - fixed to discard earlier advertising

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 12:50:21 PDT 2016


Author: spatel
Date: Tue Apr  5 14:50:21 2016
New Revision: 265444

URL: http://llvm.org/viewvc/llvm-project?rev=265444&view=rev
Log:
fixed to discard earlier advertising

Also, hardcode (there must be a better way...) the 'utils' dir in the 
advertisement, so it's easier to find.

Modified:
    llvm/trunk/utils/update_test_checks.py

Modified: llvm/trunk/utils/update_test_checks.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/update_test_checks.py?rev=265444&r1=265443&r2=265444&view=diff
==============================================================================
--- llvm/trunk/utils/update_test_checks.py (original)
+++ llvm/trunk/utils/update_test_checks.py Tue Apr  5 14:50:21 2016
@@ -38,6 +38,7 @@ import sys
 import tempfile
 import re
 
+ADVERT = '; NOTE: Assertions have been autogenerated by '
 
 # RegEx: this is where the magic happens.
 
@@ -275,8 +276,7 @@ def main():
   parser.add_argument('tests', nargs='+')
   args = parser.parse_args()
 
-  autogenerated_note = ('; NOTE: Assertions have been autogenerated by '
-                        + os.path.basename(__file__))
+  autogenerated_note = (ADVERT + 'utils/' + os.path.basename(__file__))
 
   tool_basename = os.path.basename(args.tool_binary)
   if (tool_basename != "llc" and tool_basename != "opt"):
@@ -366,7 +366,8 @@ def main():
           is_in_function = False
         continue
 
-      if input_line == autogenerated_note:
+      # Discard any previous script advertising.
+      if input_line.startswith(ADVERT):
         continue
 
       # If it's outside a function, it just gets copied to the output.




More information about the llvm-commits mailing list