aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-03-06 10:48:25 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-03-06 10:48:25 +0100
commit6c3d550c4a934d9669455aa81836772b4520e39f (patch)
tree62e57c43c934bf6fc62a2d1c907d67e74a7f07db /gcc/dwarf2out.c
parent2dc6d6660ad8b5d3f881ff4a13c3ee65215fcea7 (diff)
downloadgcc-6c3d550c4a934d9669455aa81836772b4520e39f.zip
gcc-6c3d550c4a934d9669455aa81836772b4520e39f.tar.gz
gcc-6c3d550c4a934d9669455aa81836772b4520e39f.tar.bz2
re PR debug/39387 (Wrong DW_AT_decl_line on DW_TAG_imported* for using directives in C+ functions)
PR debug/39387 * dwarf2out.c (dwarf2out_imported_module_or_decl_1): For IMPORTED_DECL take locus from its DECL_SOURCE_LOCATION instead of input_location. From-SVN: r144666
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 848926b..22852fa 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -15490,7 +15490,10 @@ dwarf2out_imported_module_or_decl_1 (tree decl,
lexical_block_die,
lexical_block);
- xloc = expand_location (input_location);
+ if (TREE_CODE (decl) == IMPORTED_DECL)
+ xloc = expand_location (DECL_SOURCE_LOCATION (decl));
+ else
+ xloc = expand_location (input_location);
add_AT_file (imported_die, DW_AT_decl_file, lookup_filename (xloc.file));
add_AT_unsigned (imported_die, DW_AT_decl_line, xloc.line);
if (name)