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:
3d40144
)
ada: don't map NULL decl to locus
author
Alexandre Oliva
<oliva@adacore.com>
Thu, 29 Dec 2022 17:33:02 +0000
(14:33 -0300)
committer
Alexandre Oliva
<oliva@gnu.org>
Thu, 29 Dec 2022 17:39:47 +0000
(14:39 -0300)
When decl is NULL, don't record its mapping in the
decl_to_instance_map.
for gcc/ada/ChangeLog
* gcc-interface/trans.cc (Sloc_to_locus): Don't map NULL decl.
gcc/ada/gcc-interface/trans.cc
patch
|
blob
|
history
diff --git
a/gcc/ada/gcc-interface/trans.cc
b/gcc/ada/gcc-interface/trans.cc
index
59332f9
..
6579ad1
100644
(file)
--- a/
gcc/ada/gcc-interface/trans.cc
+++ b/
gcc/ada/gcc-interface/trans.cc
@@
-10564,7
+10564,7
@@
Sloc_to_locus (Source_Ptr Sloc, location_t *locus, bool clear_column,
*locus
= linemap_position_for_line_and_column (line_table, map, line, column);
- if (file_map && file_map[file - 1].Instance)
+ if (
decl &&
file_map && file_map[file - 1].Instance)
decl_to_instance_map->put (decl, file_map[file - 1].Instance);
return true;