diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-05-14 16:55:57 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-05-15 08:50:17 +0200 |
commit | 8018a7eae5b4888f381758e07521627640ec5932 (patch) | |
tree | a7227ed4ef2ea60232e6d0fa4a64c8b36f570830 /gcc | |
parent | f21c760ce9cba7d478cc7c1e64f2c11cd142a614 (diff) | |
download | gcc-8018a7eae5b4888f381758e07521627640ec5932.zip gcc-8018a7eae5b4888f381758e07521627640ec5932.tar.gz gcc-8018a7eae5b4888f381758e07521627640ec5932.tar.bz2 |
Guard indent calculations in trace_ranger by dumping().
This keeps the indentation from going haywire when GORI dumping
is turned on and off during a compilation unit.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimple-ranger.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/gimple-ranger.cc b/gcc/gimple-ranger.cc index 74cfc67..e72805b 100644 --- a/gcc/gimple-ranger.cc +++ b/gcc/gimple-ranger.cc @@ -840,9 +840,9 @@ bool trace_ranger::trailer (unsigned counter, const char *caller, bool result, tree name, const irange &r) { - indent -= bump; if (dumping (counter, true)) { + indent -= bump; fputs(result ? "TRUE : " : "FALSE : ", dump_file); fprintf (dump_file, "(%u) ", counter); fputs (caller, dump_file); @@ -857,10 +857,10 @@ trace_ranger::trailer (unsigned counter, const char *caller, bool result, } else fputc('\n', dump_file); + // Marks the end of a request. + if (indent == 0) + fputc('\n', dump_file); } - // Marks the end of a request. - if (indent == 0) - fputc('\n', dump_file); return result; } |