summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authoraaw <aaw@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-28 04:25:54 +0000
committeraaw <aaw@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-28 04:25:54 +0000
commit3a17037ce59a3993817e5803d1c2f42774965063 (patch)
tree879e65668805330d7be1aedfae2d117c74ba8aec /gcc/varasm.c
parent2caa140f7debda95fb088c9e619486200a72f654 (diff)
downloadgcc-3a17037ce59a3993817e5803d1c2f42774965063.tar.gz
gcc/
* varasm.c (compare_constant): Removed call to lang_hooks.expand_constant. (copy_constants): Removed call to lang_hooks.expand_constant. (compute_reloc_for_constant): Removed call to lang_hooks.expand_constant. (output_addressed_constants): Removed call to lang_hooks.expand_constant. (constructor_static_from_elts_p): Removed call to lang_hooks.expand_constant. (output_constant): Removed calls to lang_hooks.expand_constant. * langhooks.h (struct lang_hooks): Removed field expand_constant. * langhooks-def.h (lhd_return_tree): Removed. (LANG_HOOKS_EXPAND_CONSTANT): Removed. (LANG_HOOKS_INITIALIZER): Removed LANG_HOOKS_EXPAND_CONSTANT. * langhooks.c (lhd_return_tree): Removed. gcc/cp/ * typeck2.c (digest_init): Call cplus_expand_constant after convert_for_initialization. * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed. * expr.c (cplus_expand_constant): Updated function description. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128859 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 9dece23fefe..e85824577f6 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2985,15 +2985,7 @@ compare_constant (const tree t1, const tree t2)
return compare_constant (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0));
default:
- {
- tree nt1, nt2;
- nt1 = lang_hooks.expand_constant (t1);
- nt2 = lang_hooks.expand_constant (t2);
- if (nt1 != t1 || nt2 != t2)
- return compare_constant (nt1, nt2);
- else
- return 0;
- }
+ return 0;
}
gcc_unreachable ();
@@ -3061,12 +3053,7 @@ copy_constant (tree exp)
}
default:
- {
- tree t = lang_hooks.expand_constant (exp);
-
- gcc_assert (t != exp);
- return copy_constant (t);
- }
+ gcc_unreachable ();
}
}
@@ -3910,10 +3897,6 @@ compute_reloc_for_constant (tree exp)
int reloc = 0, reloc2;
tree tem;
- /* Give the front-end a chance to convert VALUE to something that
- looks more like a constant to the back-end. */
- exp = lang_hooks.expand_constant (exp);
-
switch (TREE_CODE (exp))
{
case ADDR_EXPR:
@@ -3978,10 +3961,6 @@ output_addressed_constants (tree exp)
{
tree tem;
- /* Give the front-end a chance to convert VALUE to something that
- looks more like a constant to the back-end. */
- exp = lang_hooks.expand_constant (exp);
-
switch (TREE_CODE (exp))
{
case ADDR_EXPR:
@@ -4055,10 +4034,6 @@ constructor_static_from_elts_p (const_tree ctor)
tree
initializer_constant_valid_p (tree value, tree endtype)
{
- /* Give the front-end a chance to convert VALUE to something that
- looks more like a constant to the back-end. */
- value = lang_hooks.expand_constant (value);
-
switch (TREE_CODE (value))
{
case CONSTRUCTOR:
@@ -4317,11 +4292,6 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
enum tree_code code;
unsigned HOST_WIDE_INT thissize;
- /* Some front-ends use constants other than the standard language-independent
- varieties, but which may still be output directly. Give the front-end a
- chance to convert EXP to a language-independent representation. */
- exp = lang_hooks.expand_constant (exp);
-
if (size == 0 || flag_syntax_only)
return;
@@ -4378,9 +4348,6 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
code = TREE_CODE (TREE_TYPE (exp));
thissize = int_size_in_bytes (TREE_TYPE (exp));
- /* Give the front end another chance to expand constants. */
- exp = lang_hooks.expand_constant (exp);
-
/* Allow a constructor with no elements for any data type.
This means to fill the space with zeros. */
if (TREE_CODE (exp) == CONSTRUCTOR