aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-08-01 14:51:13 -0700
committerRichard Henderson <rth@gcc.gnu.org>2003-08-01 14:51:13 -0700
commit75c209808126e1c2ef4a5c3ce7c25700416d078f (patch)
tree09777e2a3ebda4ff012aec58bf5140c64a6bbe37 /gcc/dwarf2out.c
parentc197e3066130fb10da0c2f58a3a7fff3ab707487 (diff)
downloadgcc-75c209808126e1c2ef4a5c3ce7c25700416d078f.zip
gcc-75c209808126e1c2ef4a5c3ce7c25700416d078f.tar.gz
gcc-75c209808126e1c2ef4a5c3ce7c25700416d078f.tar.bz2
system.h: Poison ASM_SIMPLIFY_DWARF_ADDR.
* system.h: Poison ASM_SIMPLIFY_DWARF_ADDR. * varasm.c (lookup_constant_def): New function. * rtl.h (lookup_constant_def): Declare it. * dwarf2out.c (loc_descriptor_from_tree): Use it. Use targetm.delegitimize_address, not ASM_SIMPLIFY_DWARF_ADDR. From-SVN: r70072
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 91336a1..48f0f92 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -8560,17 +8560,19 @@ loc_descriptor_from_tree (tree loc, int addressp)
case CONSTRUCTOR:
{
- /* Get an RTL for this, which will may have the effect of outputting
- it. This may violates the principle of not having -g affect
- the generated code, but it's in the data segment and it's hard
- to see a case where it won't already have been output. */
- rtx rtl = output_constant_def (loc, 0);
-
-#ifdef ASM_SIMPLIFY_DWARF_ADDR
- rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl);
-#endif
+ /* Get an RTL for this, if something has been emitted. */
+ rtx rtl = lookup_constant_def (loc);
+ enum machine_mode mode;
+
+ if (GET_CODE (rtl) != MEM)
+ return 0;
+ mode = GET_MODE (rtl);
+ rtl = XEXP (rtl, 0);
+
+ rtl = (*targetm.delegitimize_address) (rtl);
+
indirect_p = 1;
- ret = mem_loc_descriptor (XEXP (rtl, 0), GET_MODE (rtl));
+ ret = mem_loc_descriptor (rtl, mode);
break;
}