]> gcc.gnu.org Git - gcc.git/commitdiff
gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p] by increment rather...
authorJakub Jelinek <jakub@redhat.com>
Wed, 26 Oct 2016 16:20:54 +0000 (18:20 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 26 Oct 2016 16:20:54 +0000 (18:20 +0200)
* gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p]
by increment rather than double it.
(insert_remove_pass): Strip leading whitespace from args[3].  Don't
emit a space before args[4].
(END): Don't emit a space before with_arg.

From-SVN: r241580

gcc/ChangeLog
gcc/gen-pass-instances.awk

index 45ae4eab82ac82e03d22e93d82a5ea571a39cd82..4af539e39a827eb0a22af78ac786ab40bb8ab788 100644 (file)
@@ -1,3 +1,11 @@
+2016-10-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p]
+       by increment rather than double it.
+       (insert_remove_pass): Strip leading whitespace from args[3].  Don't
+       emit a space before args[4].
+       (END): Don't emit a space before with_arg.
+
 2016-10-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Add new ARMv8-M
index dcbe20f245e7007910be6dfca8fe55fda4969636..5a6ee7d8768578182eaa9cfc25457250a9caa527 100644 (file)
@@ -90,7 +90,7 @@ function adjust_linenos(above, increment,     p, i)
 {
   for (p in pass_lines)
     if (pass_lines[p] >= above)
-      pass_lines[p] += pass_lines[p];
+      pass_lines[p] += increment;
   if (increment > 0)
     for (i = lineno - 1; i >= above; i--)
       lines[i + increment] = lines[i];
@@ -100,16 +100,18 @@ function adjust_linenos(above, increment, p, i)
   lineno += increment;
 }
 
-function insert_remove_pass(line, fnname)
+function insert_remove_pass(line, fnname,      arg3)
 {
   parse_line($0, fnname);
   pass_name = args[1];
   if (pass_name == "PASS")
     return 1;
   pass_num = args[2] + 0;
-  new_line = prefix "NEXT_PASS (" args[3];
+  arg3 = args[3];
+  sub(/^[ \t]*/, "", arg3);
+  new_line = prefix "NEXT_PASS (" arg3;
   if (args[4])
-    new_line = new_line ", " args[4];
+    new_line = new_line "," args[4];
   new_line = new_line ")" postfix;
   if (!pass_lines[pass_name, pass_num])
     {
@@ -218,7 +220,7 @@ END {
            printf "NEXT_PASS";
          printf " (%s, %s", pass_name, pass_num;
          if (with_arg)
-           printf ", %s", with_arg;
+           printf ",%s", with_arg;
          printf ")%s\n", postfix;
        }
       else
This page took 0.102489 seconds and 5 git commands to generate.