summaryrefslogtreecommitdiff
path: root/gcc/c-objc-common.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-09 15:32:44 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-09 15:32:44 +0000
commitfcdd3ab38ad059aa13f40b29e0981e259da6d433 (patch)
treea63536f7f79b61493abe2609fb704c1c740bcd7d /gcc/c-objc-common.c
parentccdd72c880df662857082fbc5e3088ca8eda6f1f (diff)
downloadlinaro-gcc-fcdd3ab38ad059aa13f40b29e0981e259da6d433.tar.gz
linaro-gcc-fcdd3ab38ad059aa13f40b29e0981e259da6d433.tar.bz2
linaro-gcc-fcdd3ab38ad059aa13f40b29e0981e259da6d433.zip
Gimplify VA_ARG_EXPR into simpler forms.
* target.h: Add gimplify_va_arg_expr hook. * target-def.h: Add TARGET_GIMPLIFY_VA_ARG_EXPR. * fold-const.c (build_fold_addr_expr) (build_fold_addr_expr_with_type): Move from gimplify.c. * tree.h: Declare them. * gimplify.c (gimplify_and_add): New fn. (build_addr_expr, build_addr_expr_with_type): Move to fold-const.c. (gimplify_array_ref_to_plus, gimplify_modify_expr) (gimplify_expr): Use build_fold_*. (copy_if_shared_r): Only mark VA_ARG_EXPR volatile if we don't know how to gimplify it. * builtins.c (std_gimplify_va_arg_expr): New fn. (dummy_object): New static fn. (gimplify_va_arg_expr): New fn. (stabilize_va_list): Use build_fold_*. * tree-gimple.h: Declare new fns. * config/i386/i386.c (TARGET_GIMPLIFY_VA_ARG_EXPR): Define. (ix86_gimplify_va_arg): New fn. * config/i386/ia64.c (TARGET_GIMPLIFY_VA_ARG_EXPR): Define. (ia64_gimplify_va_arg): New fn. * config/i386/rs6000.c (rs6000_gimplify_va_arg): New fn. (TARGET_GIMPLIFY_VA_ARG_EXPR): Define. * config/i386/sparc.c (sparc_gimplify_va_arg): New fn. * alias.c (get_varargs_alias_set): Just return 0 for now. * c-objc-common.c (c_tree_printer): Improve handling of %T. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82838 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r--gcc/c-objc-common.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index 6b17ad4e690..f32bf6d8fe0 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -270,17 +270,15 @@ c_tree_printer (pretty_printer *pp, text_info *text)
break;
case 'T':
- if (TREE_CODE (t) == TYPE_DECL)
+ if (TYPE_P (t))
+ t = TYPE_NAME (t);
+ if (t && TREE_CODE (t) == TYPE_DECL)
{
if (DECL_NAME (t))
n = lang_hooks.decl_printable_name (t, 2);
}
- else
- {
- t = TYPE_NAME (t);
- if (t)
- n = IDENTIFIER_POINTER (t);
- }
+ else if (t)
+ n = IDENTIFIER_POINTER (t);
break;
case 'E':