]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gen-pass-instances.awk: Add len_of_call var in handle_line
authorTom de Vries <tom@codesourcery.com>
Thu, 12 Nov 2015 07:31:13 +0000 (07:31 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Thu, 12 Nov 2015 07:31:13 +0000 (07:31 +0000)
2015-11-12  Tom de Vries  <tom@codesourcery.com>

* gen-pass-instances.awk (handle_line): Add len_of_call variable.

From-SVN: r230209

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

index 5ed0f411c0b96f89dd9f56703296b8ba50ca7d3a..535c0cfcf0a8e27341684aa387c250693fc58f09 100644 (file)
@@ -1,3 +1,7 @@
+2015-11-12  Tom de Vries  <tom@codesourcery.com>
+
+       * gen-pass-instances.awk (handle_line): Add len_of_call variable.
+
 2015-11-12  Tom de Vries  <tom@codesourcery.com>
 
        * gen-pass-instances.awk (handle_line): Restructure using early-out.
index 27e7a98a8d54bc648449a56a3f50f14da30c7280..70b00b7655ddf1a6bec88c3942b1ff3322cfaff7 100644 (file)
@@ -42,6 +42,7 @@ function handle_line()
 {
        line = $0;
 
+       # Find call expression.
        where = match(line, /NEXT_PASS \((.+)\)/);
        if (where == 0)
        {
@@ -49,9 +50,12 @@ function handle_line()
                return;
        }
 
+       # Length of the call expression.
+       len_of_call = RLENGTH;
+
        len_of_start = length("NEXT_PASS (");
        len_of_end = length(")");
-       len_of_pass_name = RLENGTH - (len_of_start + len_of_end);
+       len_of_pass_name = len_of_call - (len_of_start + len_of_end);
        pass_starts_at = where + len_of_start;
        pass_name = substr(line, pass_starts_at, len_of_pass_name);
        if (pass_name in pass_counts)