This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] middle-end: use dump_location instead of copy-pasted code


There are some inconsistencies in the middle-end about how to dump a
location. The following patch makes all places (that I found) use
dump_location, and makes that function print also the column number.

While searching for possible callers, I noticed two cases where we use
expanded_location for no good reason.

Bootstrapped and regression tested on x86_64-linux-gnu.

OK?

gcc/ChangeLog:

2014-10-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>

    * tree-pretty-print.c (dump_location): Make it extern. Dump also
    the column.
    * tree-pretty-print.h (dump_location): Declare.
    * gimple-pretty-print.c (dump_gimple_phi): Use dump_location.
    (pp_gimple_stmt_1): Likewise.
    (dump_implicit_edges): Likewise.
    * gimplify.c (gimplify_call_expr): Use LOCATION_FILE and
    LOCATION_LINE.


gcc/testsuite/ChangeLog:

2014-10-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>

    * gcc.dg/tm/debug-1.c: Update regex.
    * c-c++-common/raw-string-18.c: Update regex.
    * c-c++-common/raw-string-19.c: Update regex.

Attachment: dumploc.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]