OSDN Git Service

* dwarf2out.c (add_location_or_const_value_attribute): Prefer
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Aug 2005 21:22:43 +0000 (21:22 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Aug 2005 21:22:43 +0000 (21:22 +0000)
locations gathered by var-tracking in single entry loc_list
over loc_descriptor_from_tree.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103004 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dwarf2out.c

index 8120d90..ec2c917 100644 (file)
@@ -1,5 +1,9 @@
 2005-08-11  Jakub Jelinek  <jakub@redhat.com>
 
+       * dwarf2out.c (add_location_or_const_value_attribute): Prefer
+       locations gathered by var-tracking in single entry loc_list
+       over loc_descriptor_from_tree.
+
        * dwarf2out.c (concat_loc_descriptor): Add can_use_fbreg argument,
        pass it down to loc_descriptor.
        (loc_descriptor): Pass can_use_fbreg to concat_loc_descriptor.
index 44750f9..2dc03f4 100644 (file)
@@ -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;
     }
 }