aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-dump.c')
-rw-r--r--gcc/tree-dump.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c
index e5fce0e..039aca1 100644
--- a/gcc/tree-dump.c
+++ b/gcc/tree-dump.c
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "tree.h"
#include "splay-tree.h"
+#include "filenames.h"
#include "diagnostic-core.h"
#include "toplev.h"
#include "tree-dump.h"
@@ -359,12 +360,7 @@ dequeue_and_dump (dump_info_p di)
xloc = expand_location (DECL_SOURCE_LOCATION (t));
if (xloc.file)
{
- const char *filename = strrchr (xloc.file, '/');
- if (!filename)
- filename = xloc.file;
- else
- /* Skip the slash. */
- ++filename;
+ const char *filename = lbasename (xloc.file);
dump_maybe_newline (di);
fprintf (di->stream, "srcp: %s:%-6d ", filename,