diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-10-26 18:20:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-10-26 18:20:54 +0200 |
commit | 984fa0eacb8a9e738305bed0deff3f36830bf04b (patch) | |
tree | 7dca8cd9078a12cfc08ed1d25b5b31ea17d1fe27 /gcc/gen-pass-instances.awk | |
parent | 32502b58e2a59b41c4ef81e485b5999c88d86a69 (diff) | |
download | gcc-984fa0eacb8a9e738305bed0deff3f36830bf04b.tar.gz |
gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p] by increment rather than double it.
* 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
Diffstat (limited to 'gcc/gen-pass-instances.awk')
-rw-r--r-- | gcc/gen-pass-instances.awk | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/gen-pass-instances.awk b/gcc/gen-pass-instances.awk index dcbe20f245e..5a6ee7d8768 100644 --- a/gcc/gen-pass-instances.awk +++ b/gcc/gen-pass-instances.awk @@ -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 |