aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-12-17 00:16:49 +0000
committerAlan Modra <amodra@gmail.com>2012-12-17 00:16:49 +0000
commit4194268f43623a5f893b9a92b0456d3cb43ab915 (patch)
treed3c470f3494ea65b44f5ca7d69aa1640c93ace2e /ld/ldexp.h
parentfaa7371af5014736b1c67cc7bd0cbcca3353a953 (diff)
downloadgdb-4194268f43623a5f893b9a92b0456d3cb43ab915.zip
gdb-4194268f43623a5f893b9a92b0456d3cb43ab915.tar.gz
gdb-4194268f43623a5f893b9a92b0456d3cb43ab915.tar.bz2
PR ld/14962
* ldexp.h (struct ldexp_control): Add "assign_name". * ldexp.c (fold_name <NAME>): Compare and clear assign_name on match. (exp_fold_tree_1): Remove existing code testing for self assignment. Instead set and test expld.assign_name. * ldlang.c (scan_for_self_assignment): Delete. (print_assignment): Instead set and test expld.assign_name.
Diffstat (limited to 'ld/ldexp.h')
-rw-r--r--ld/ldexp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/ldexp.h b/ld/ldexp.h
index 187016c..2c726e7 100644
--- a/ld/ldexp.h
+++ b/ld/ldexp.h
@@ -139,6 +139,11 @@ struct ldexp_control {
/* Principally used for diagnostics. */
bfd_boolean assigning_to_dot;
+ /* If evaluating an assignment, the destination. Cleared if an
+ etree_name NAME matches this, to signal a self-assignment.
+ Note that an etree_name DEFINED does not clear this field, nor
+ does the false branch of a trinary expression. */
+ const char *assign_name;
/* Working results. */
etree_value_type result;