aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-08-11 23:22:43 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2005-08-11 23:22:43 +0200
commit86bd8ebf5dec81d0a84b72a289db5af36f7d866d (patch)
treeb522af862704889ed8299e0f561bb9942ffb9181 /gcc/dwarf2out.c
parentea93971a13d434c549a2d54637061ad15b14b756 (diff)
downloadgcc-86bd8ebf5dec81d0a84b72a289db5af36f7d866d.zip
gcc-86bd8ebf5dec81d0a84b72a289db5af36f7d866d.tar.gz
gcc-86bd8ebf5dec81d0a84b72a289db5af36f7d866d.tar.bz2
dwarf2out.c (add_location_or_const_value_attribute): Prefer locations gathered by var-tracking in single entry loc_list over...
* dwarf2out.c (add_location_or_const_value_attribute): Prefer locations gathered by var-tracking in single entry loc_list over loc_descriptor_from_tree. From-SVN: r103004
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 44750f9..2dc03f4 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -10235,16 +10235,7 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl,
return;
}
- /* We couldn't get any rtl, and we had no >1 element location list, so try
- directly generating the location description from the tree. */
- descr = loc_descriptor_from_tree (decl);
- if (descr)
- {
- add_AT_location_description (die, attr, descr);
- return;
- }
-
- /* Lastly, if we have tried to generate the location otherwise, and it
+ /* If we have tried to generate the location otherwise, and it
didn't work out (we wouldn't be here if we did), and we have a one entry
location list, try generating a location from that. */
if (loc_list && loc_list->first)
@@ -10253,7 +10244,19 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl,
descr = loc_descriptor (NOTE_VAR_LOCATION (node->var_loc_note),
can_use_fb);
if (descr)
- add_AT_location_description (die, attr, descr);
+ {
+ add_AT_location_description (die, attr, descr);
+ return;
+ }
+ }
+
+ /* We couldn't get any rtl, so try directly generating the location
+ description from the tree. */
+ descr = loc_descriptor_from_tree (decl);
+ if (descr)
+ {
+ add_AT_location_description (die, attr, descr);
+ return;
}
}