projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb0ceea
)
Fix NULL filename handling
author
Richard Purdie
<richard.purdie@linuxfoundation.org>
Mon, 7 Nov 2022 16:26:44 +0000
(17:26 +0100)
committer
Eric Botcazou
<ebotcazou@adacore.com>
Mon, 7 Nov 2022 16:36:06 +0000
(17:36 +0100)
The previous commit introduced a regression as some Ada tests end up passing
NULL as the filename to remap_filename. Handle this as before to fix them.
gcc/
* file-prefix-map.cc (remap_filename): Handle NULL filenames.
gcc/file-prefix-map.cc
patch
|
blob
|
history
diff --git
a/gcc/file-prefix-map.cc
b/gcc/file-prefix-map.cc
index
439586b
..
40b10ed
100644
(file)
--- a/
gcc/file-prefix-map.cc
+++ b/
gcc/file-prefix-map.cc
@@
-73,7
+73,7
@@
remap_filename (file_prefix_map *maps, const char *filename)
char *realname;
size_t name_len;
- if (lbasename (filename) == filename)
+ if (
!filename ||
lbasename (filename) == filename)
return filename;
realname = lrealpath (filename);