public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] ada: don't map null decl to locus
@ 2022-12-23 7:31 Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2022-12-23 7:31 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5ce1d19c2c14442ccc7da220127e6159649e3b5b
commit 5ce1d19c2c14442ccc7da220127e6159649e3b5b
Author: Alexandre Oliva <oliva@gnu.org>
Date: Fri Dec 23 04:28:39 2022 -0300
ada: don't map null decl to locus
Diff:
---
gcc/ada/gcc-interface/trans.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index 59332f93614..6579ad11cc2 100644
--- 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] ada: don't map NULL decl to locus
@ 2022-12-28 5:23 Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2022-12-28 5:23 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:00837f548054f9ede8f6956248d7c47fd78a7dfb
commit 00837f548054f9ede8f6956248d7c47fd78a7dfb
Author: Alexandre Oliva <oliva@adacore.com>
Date: Wed Dec 28 02:21:42 2022 -0300
ada: don't map NULL decl to locus
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.
Diff:
---
gcc/ada/gcc-interface/trans.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index 59332f93614..6579ad11cc2 100644
--- 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-28 5:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 7:31 [gcc(refs/users/aoliva/heads/testme)] ada: don't map null decl to locus Alexandre Oliva
2022-12-28 5:23 [gcc(refs/users/aoliva/heads/testme)] ada: don't map NULL " Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).